mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Fix proxy check regex. Props westi. fixes #3028
git-svn-id: http://svn.automattic.com/wordpress/trunk@4091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3ee11a9eb1
commit
4c1ec6dc5f
@ -1012,7 +1012,7 @@ function wp_check_filetype($filename, $mimes = null) {
|
||||
|
||||
function wp_proxy_check($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 ) ) );
|
||||
$lookup = $rev_ip . '.sbl-xbl.spamhaus.org.';
|
||||
if ( $lookup != gethostbyname( $lookup ) )
|
||||
|
Loading…
Reference in New Issue
Block a user