Fix proxy check regex. Props westi. fixes #3028
git-svn-id: https://develop.svn.wordpress.org/trunk@4091 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b1aadedac
commit
b86470f23b
|
@ -1012,7 +1012,7 @@ function wp_check_filetype($filename, $mimes = null) {
|
||||||
|
|
||||||
function wp_proxy_check($ipnum) {
|
function wp_proxy_check($ipnum) {
|
||||||
if ( get_option('open_proxy_check') && isset($ipnum) ) {
|
if ( get_option('open_proxy_check') && isset($ipnum) ) {
|
||||||
$ipnum = preg_replace( '/([0-9]{1,3})\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/', '$1', $ipnum );
|
$ipnum = preg_replace( '/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/', '$1', $ipnum );
|
||||||
$rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) );
|
$rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) );
|
||||||
$lookup = $rev_ip . '.sbl-xbl.spamhaus.org.';
|
$lookup = $rev_ip . '.sbl-xbl.spamhaus.org.';
|
||||||
if ( $lookup != gethostbyname( $lookup ) )
|
if ( $lookup != gethostbyname( $lookup ) )
|
||||||
|
|
Loading…
Reference in New Issue