mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-24 13:22:49 +02:00
2.0.11 coming soon
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@5502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f22f442c12
commit
f177fa9f6e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user