Ticket #25239: 25239.7.diff
File 25239.7.diff, 3.2 KB (added by , 6 years ago) |
---|
-
src/wp-includes/ms-functions.php
838 838 $activate_url = esc_url($activate_url); 839 839 $admin_email = get_site_option( 'admin_email' ); 840 840 if ( $admin_email == '' ) 841 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];841 $admin_email = 'support@' . parse_url( network_home_url(), PHP_URL_HOST ); 842 842 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 843 843 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 844 844 … … 944 944 // Send email with activation link. 945 945 $admin_email = get_site_option( 'admin_email' ); 946 946 if ( $admin_email == '' ) 947 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];947 $admin_email = 'support@' . parse_url( network_home_url(), PHP_URL_HOST ); 948 948 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 949 949 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 950 950 $message = sprintf( … … 1563 1563 $admin_email = get_site_option( 'admin_email' ); 1564 1564 1565 1565 if ( $admin_email == '' ) 1566 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1566 $admin_email = 'support@' . parse_url( network_home_url(), PHP_URL_HOST ); 1567 1567 1568 1568 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1569 1569 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; … … 1651 1651 $admin_email = get_site_option( 'admin_email' ); 1652 1652 1653 1653 if ( $admin_email == '' ) 1654 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1654 $admin_email = 'support@' . parse_url( network_home_url(), PHP_URL_HOST ); 1655 1655 1656 1656 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1657 1657 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; -
src/wp-includes/pluggable.php
327 327 328 328 if ( !isset( $from_email ) ) { 329 329 // Get the site domain and get rid of www. 330 $sitename = strtolower( $_SERVER['SERVER_NAME']);330 $sitename = parse_url( network_home_url(), PHP_URL_HOST ); 331 331 if ( substr( $sitename, 0, 4 ) == 'www.' ) { 332 332 $sitename = substr( $sitename, 4 ); 333 333 } … … 1506 1506 $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; 1507 1507 } 1508 1508 1509 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));1509 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', parse_url( network_home_url(), PHP_URL_HOST )); 1510 1510 1511 1511 if ( '' == $comment->comment_author ) { 1512 1512 $from = "From: \"$blogname\" <$wp_email>";