Make WordPress Core


Ignore:
Timestamp:
01/11/2017 05:14:43 AM (8 years ago)
Author:
jeremyfelt
Message:

Mail: Disable wp-mail.php when mailserver_url is mail.example.com.

Merges [39772] to the 4.7 branch.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-mail.php

    r39326 r39773  
    1414if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
    1515    wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
     16
     17$mailserver_url = get_option( 'mailserver_url' );
     18
     19if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) {
     20    wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
     21}
    1622
    1723/**
Note: See TracChangeset for help on using the changeset viewer.