Changeset 56192 for trunk/src/wp-includes/pluggable.php
- Timestamp:
- 07/10/2023 10:46:22 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r56037 r56192 268 268 } else { 269 269 if ( ! is_array( $headers ) ) { 270 // Explode the headers out, so this function can take 271 // both string headers and an array of headers. 270 /* 271 * Explode the headers out, so this function can take 272 * both string headers and an array of headers. 273 */ 272 274 $tempheaders = explode( "\n", str_replace( "\r\n", "\n", $headers ) ); 273 275 } else { … … 617 619 618 620 if ( null == $user ) { 619 // TODO: What should the error message be? (Or would these even happen?) 620 // Only needed if all authentication handlers fail to return anything. 621 /* 622 * TODO: What should the error message be? (Or would these even happen?) 623 * Only needed if all authentication handlers fail to return anything. 624 */ 621 625 $user = new WP_Error( 'authentication_failed', __( '<strong>Error:</strong> Invalid username, email address or incorrect password.' ) ); 622 626 } … … 1562 1566 } 1563 1567 1564 // In PHP 5 parse_url() may fail if the URL query part contains 'http://'. 1565 // See https://bugs.php.net/bug.php?id=38143 1568 /* 1569 * In PHP 5 parse_url() may fail if the URL query part contains 'http://'. 1570 * See https://bugs.php.net/bug.php?id=38143 1571 */ 1566 1572 $cut = strpos( $location, '?' ); 1567 1573 $test = $cut ? substr( $location, 0, $cut ) : $location; … … 1588 1594 } 1589 1595 1590 // Reject if certain components are set but host is not. 1591 // This catches URLs like https:host.com for which parse_url() does not set the host field. 1596 /* 1597 * Reject if certain components are set but host is not. 1598 * This catches URLs like https:host.com for which parse_url() does not set the host field. 1599 */ 1592 1600 if ( ! isset( $lp['host'] ) && ( isset( $lp['scheme'] ) || isset( $lp['user'] ) || isset( $lp['pass'] ) || isset( $lp['port'] ) ) ) { 1593 1601 return $fallback_url; … … 1715 1723 } 1716 1724 1717 // The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 1718 // We want to reverse this for the plain text arena of emails. 1725 /* 1726 * The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 1727 * We want to reverse this for the plain text arena of emails. 1728 */ 1719 1729 $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 1720 1730 $comment_content = wp_specialchars_decode( $comment->comment_content ); … … 1904 1914 $comments_waiting = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'" ); 1905 1915 1906 // The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 1907 // We want to reverse this for the plain text arena of emails. 1916 /* 1917 * The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 1918 * We want to reverse this for the plain text arena of emails. 1919 */ 1908 1920 $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 1909 1921 $comment_content = wp_specialchars_decode( $comment->comment_content ); … … 2043 2055 */ 2044 2056 function wp_password_change_notification( $user ) { 2045 // Send a copy of password change notification to the admin, 2046 // but check to see if it's the admin whose password we're changing, and skip this. 2057 /* 2058 * Send a copy of password change notification to the admin, 2059 * but check to see if it's the admin whose password we're changing, and skip this. 2060 */ 2047 2061 if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) { 2048 2062 /* translators: %s: User name. */ 2049 2063 $message = sprintf( __( 'Password changed for user: %s' ), $user->user_login ) . "\r\n"; 2050 // The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 2051 // We want to reverse this for the plain text arena of emails. 2064 /* 2065 * The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 2066 * We want to reverse this for the plain text arena of emails. 2067 */ 2052 2068 $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 2053 2069 … … 2116 2132 $user = get_userdata( $user_id ); 2117 2133 2118 // The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 2119 // We want to reverse this for the plain text arena of emails. 2134 /* 2135 * The blogname option is escaped with esc_html() on the way into the database in sanitize_option(). 2136 * We want to reverse this for the plain text arena of emails. 2137 */ 2120 2138 $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 2121 2139 … … 2573 2591 } 2574 2592 2575 // If the stored hash is longer than an MD5, 2576 // presume the new style phpass portable hash. 2593 /* 2594 * If the stored hash is longer than an MD5, 2595 * presume the new style phpass portable hash. 2596 */ 2577 2597 if ( empty( $wp_hasher ) ) { 2578 2598 require_once ABSPATH . WPINC . '/class-phpass.php'; … … 2652 2672 global $rnd_value; 2653 2673 2654 // Some misconfigured 32-bit environments (Entropy PHP, for example) 2655 // truncate integers larger than PHP_INT_MAX to PHP_INT_MAX rather than overflowing them to floats. 2674 /* 2675 * Some misconfigured 32-bit environments (Entropy PHP, for example) 2676 * truncate integers larger than PHP_INT_MAX to PHP_INT_MAX rather than overflowing them to floats. 2677 */ 2656 2678 $max_random_number = 3000000000 === 2147483647 ? (float) '4294967295' : 4294967295; // 4294967295 = 0xffffffff 2657 2679 … … 2688 2710 } 2689 2711 2690 // Reset $rnd_value after 14 uses. 2691 // 32 (md5) + 40 (sha1) + 40 (sha1) / 8 = 14 random numbers from $rnd_value. 2712 /* 2713 * Reset $rnd_value after 14 uses. 2714 * 32 (md5) + 40 (sha1) + 40 (sha1) / 8 = 14 random numbers from $rnd_value. 2715 */ 2692 2716 if ( strlen( $rnd_value ) < 8 ) { 2693 2717 if ( defined( 'WP_SETUP_CONFIG' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.