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:
parent
57aabc9252
commit
86e5a8a70d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue