diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 2176ef0e4d..44bb06c24b 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -649,10 +649,13 @@ function trackback_url_list($tb_list, $post_id) { } function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) { - global $wpdb; + global $wpdb, $wp_blacklist_reason; do_action('wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent); +// mj +$wp_blacklist_reason = 'encoded_char'; + if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) { foreach ($chars[1] as $char) { // If it's an encoded char in the normal ASCII set, reject @@ -676,19 +679,28 @@ function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_age // spam words don't break things: $word = preg_quote($word, '#'); - $pattern = "#$word#i"; + $pattern = "#$word#i"; + +$wp_blacklist_reason = "$pattern (author) $author"; if ( preg_match($pattern, $author ) ) return true; +$wp_blacklist_reason = "$pattern (email) $email"; if ( preg_match($pattern, $email ) ) return true; +$wp_blacklist_reason = "$pattern (url) $url"; if ( preg_match($pattern, $url ) ) return true; +$wp_blacklist_reason = "$pattern (url) $url"; if ( preg_match($pattern, $comment ) ) return true; +$wp_blacklist_reason = "$pattern (user_ip) $user_ip"; if ( preg_match($pattern, $user_ip ) ) return true; +$wp_blacklist_reason = "$pattern (user_agent) $user_agent"; if ( preg_match($pattern, $user_agent) ) return true; } - + +$wp_blacklist_reason = "proxy check"; + if ( isset($_SERVER['REMOTE_ADDR']) ) { if ( wp_proxy_check($_SERVER['REMOTE_ADDR']) ) return true; } - +$wp_blacklist_reason = "not a WP reason"; return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index f5fc7bbad9..14dbe2beb0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -2,7 +2,7 @@ // This just holds the version number, in a separate file so we can bump it without cluttering the SVN -$wp_version = '2.0.10'; +$wp_version = '2.0.11-RC1'; $wp_db_version = 3441; ?>