Ticket #25239: 25239.r47544.patch
File 25239.r47544.patch, 3.0 KB (added by , 5 years ago) |
---|
-
src/wp-includes/ms-functions.php
946 946 $activate_url = esc_url( $activate_url ); 947 947 $admin_email = get_site_option( 'admin_email' ); 948 948 if ( '' == $admin_email ) { 949 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];949 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 950 950 } 951 951 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 952 952 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; … … 1071 1071 // Send email with activation link. 1072 1072 $admin_email = get_site_option( 'admin_email' ); 1073 1073 if ( '' == $admin_email ) { 1074 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1074 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1075 1075 } 1076 1076 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1077 1077 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; … … 1635 1635 $admin_email = get_site_option( 'admin_email' ); 1636 1636 1637 1637 if ( '' == $admin_email ) { 1638 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1638 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1639 1639 } 1640 1640 1641 1641 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); … … 1727 1727 $admin_email = get_site_option( 'admin_email' ); 1728 1728 1729 1729 if ( '' == $admin_email ) { 1730 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1730 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1731 1731 } 1732 1732 1733 1733 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); -
src/wp-includes/pluggable.php
328 328 */ 329 329 if ( ! isset( $from_email ) ) { 330 330 // Get the site domain and get rid of www. 331 $sitename = strtolower( $_SERVER['SERVER_NAME']);331 $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST ); 332 332 if ( substr( $sitename, 0, 4 ) == 'www.' ) { 333 333 $sitename = substr( $sitename, 4 ); 334 334 } … … 1640 1640 $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; 1641 1641 } 1642 1642 1643 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', strtolower( $_SERVER['SERVER_NAME']) );1643 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', wp_parse_url( network_home_url(), PHP_URL_HOST ) ); 1644 1644 1645 1645 if ( '' == $comment->comment_author ) { 1646 1646 $from = "From: \"$blogname\" <$wp_email>";