Revert accidental debug commit in [5502]

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@5504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-05-21 18:18:03 +00:00
parent e44c069b1f
commit a8de3da89b
1 changed files with 4 additions and 16 deletions

View File

@ -649,13 +649,10 @@ function trackback_url_list($tb_list, $post_id) {
}
function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) {
global $wpdb, $wp_blacklist_reason;
global $wpdb;
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
@ -679,28 +676,19 @@ $wp_blacklist_reason = 'encoded_char';
// spam words don't break things:
$word = preg_quote($word, '#');
$pattern = "#$word#i";
$wp_blacklist_reason = "$pattern (author) $author";
$pattern = "#$word#i";
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;
}