Changeset 5504
- Timestamp:
- 05/21/07 18:18:03 (1 year ago)
- Files:
-
- branches/2.0/wp-includes/functions-post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.0/wp-includes/functions-post.php
r5502 r5504 650 650 651 651 function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) { 652 global $wpdb , $wp_blacklist_reason;652 global $wpdb; 653 653 654 654 do_action('wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent); 655 656 // mj657 $wp_blacklist_reason = 'encoded_char';658 655 659 656 if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) { … … 680 677 $word = preg_quote($word, '#'); 681 678 682 $pattern = "#$word#i"; 683 684 $wp_blacklist_reason = "$pattern (author) $author"; 679 $pattern = "#$word#i"; 685 680 if ( preg_match($pattern, $author ) ) return true; 686 $wp_blacklist_reason = "$pattern (email) $email";687 681 if ( preg_match($pattern, $email ) ) return true; 688 $wp_blacklist_reason = "$pattern (url) $url";689 682 if ( preg_match($pattern, $url ) ) return true; 690 $wp_blacklist_reason = "$pattern (url) $url";691 683 if ( preg_match($pattern, $comment ) ) return true; 692 $wp_blacklist_reason = "$pattern (user_ip) $user_ip";693 684 if ( preg_match($pattern, $user_ip ) ) return true; 694 $wp_blacklist_reason = "$pattern (user_agent) $user_agent";695 685 if ( preg_match($pattern, $user_agent) ) return true; 696 686 } 697 698 $wp_blacklist_reason = "proxy check"; 699 687 700 688 if ( isset($_SERVER['REMOTE_ADDR']) ) { 701 689 if ( wp_proxy_check($_SERVER['REMOTE_ADDR']) ) return true; 702 690 } 703 $wp_blacklist_reason = "not a WP reason"; 691 704 692 return false; 705 693 }
