WordPress.org

Make WordPress Core

Ticket #9965: kill-blacklist-entity-check.patch

File kill-blacklist-entity-check.patch, 767 bytes (added by tellyworth, 9 years ago)
  • comment.php

     
    625625function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) {
    626626        do_action('wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent);
    627627
    628         if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) {
    629                 foreach ( (array) $chars[1] as $char ) {
    630                         // If it's an encoded char in the normal ASCII set, reject
    631                         if ( 38 == $char )
    632                                 continue; // Unless it's &
    633                         if ( $char < 128 )
    634                                 return true;
    635                 }
    636         }
    637 
    638628        $mod_keys = trim( get_option('blacklist_keys') );
    639629        if ( '' == $mod_keys )
    640630                return false; // If moderation keys are empty