Ticket #25239: 25239.r44770.patch
File 25239.r44770.patch, 3.0 KB (added by , 6 years ago) |
---|
-
src/wp-includes/ms-functions.php
913 913 $activate_url = esc_url( $activate_url ); 914 914 $admin_email = get_site_option( 'admin_email' ); 915 915 if ( $admin_email == '' ) { 916 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];916 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 917 917 } 918 918 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 919 919 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; … … 1036 1036 // Send email with activation link. 1037 1037 $admin_email = get_site_option( 'admin_email' ); 1038 1038 if ( $admin_email == '' ) { 1039 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1039 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1040 1040 } 1041 1041 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1042 1042 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; … … 1586 1586 $admin_email = get_site_option( 'admin_email' ); 1587 1587 1588 1588 if ( $admin_email == '' ) { 1589 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1589 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1590 1590 } 1591 1591 1592 1592 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); … … 1677 1677 $admin_email = get_site_option( 'admin_email' ); 1678 1678 1679 1679 if ( $admin_email == '' ) { 1680 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1680 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1681 1681 } 1682 1682 1683 1683 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); -
src/wp-includes/pluggable.php
330 330 331 331 if ( ! isset( $from_email ) ) { 332 332 // Get the site domain and get rid of www. 333 $sitename = strtolower( $_SERVER['SERVER_NAME']);333 $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST ); 334 334 if ( substr( $sitename, 0, 4 ) == 'www.' ) { 335 335 $sitename = substr( $sitename, 4 ); 336 336 } … … 1582 1582 $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; 1583 1583 } 1584 1584 1585 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', strtolower( $_SERVER['SERVER_NAME']) );1585 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', wp_parse_url( network_home_url(), PHP_URL_HOST ) ); 1586 1586 1587 1587 if ( '' == $comment->comment_author ) { 1588 1588 $from = "From: \"$blogname\" <$wp_email>"; … … 2742 2742 return $r; 2743 2743 } 2744 2744 endif; 2745