This really deserves to be in a separate function so that plugins can get at it more easily, don't you think?

git-svn-id: http://svn.automattic.com/wordpress/trunk@2357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
emc3 2005-02-16 21:35:58 +00:00
parent 57aabc9252
commit 86e5a8a70d
1 changed files with 10 additions and 2 deletions

View File

@ -438,8 +438,16 @@ function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_age
if ( preg_match($pattern, $user_agent) ) return true;
}
if ( get_option('open_proxy_check') && isset($_SERVER['REMOTE_ADDR']) ) {
$rev_ip = implode( '.', array_reverse( explode( '.', $_SERVER['REMOTE_ADDR'] ) ) );
if ( isset($_SERVER['REMOTE_ADDR']) ) {
if ( $wp_proxy_check($_SERVER['REMOTE_ADDR']) ) return true;
}
return false;
}
function wp_proxy_check($ipnum) {
if ( get_option('open_proxy_check') && isset($ipnum) ) {
$rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) );
$lookup = $rev_ip . '.opm.blitzed.org';
if ( $lookup != gethostbyname( $lookup ) )
return true;