Make WordPress Core

Changeset 39772


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-mail.php

    r39326 r39772  
    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.