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: https://develop.svn.wordpress.org/trunk@2357 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dougal Campbell 2005-02-16 21:35:58 +00:00
parent 523757d3e6
commit 586092fa0a
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;