From 52013892c23e416f468c42a502a7ff092ff76bbc Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 30 Jul 2010 12:54:18 -0400 Subject: Correctly check dyndns hosts on 1.2.3 dns rebinding checks --- etc/inc/auth.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 0d288ef..55aeff2 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -51,10 +51,9 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][ if(is_ipaddr($http_host) or $_SERVER['SERVER_ADDR'] == "127.0.0.1" or $http_host == "localhost" or $_SERVER['SERVER_ADDR'] == "localhost") $found_host = true; - if($config['dyndnses']['dyndns']) - foreach($config['dyndnses']['dyndns'] as $dyndns) - if($dyndns['host'] == $http_host or $dyndns['host'] == $_SERVER['SERVER_ADDR']) - $found_host = true; + if (($config['dyndns']) and ($config['dyndns']['host'] == $http_host or + $config['dyndns']['host'] == $_SERVER['SERVER_ADDR'])) + $found_host = true; if(!empty($config['system']['webgui']['althostnames'])) { $althosts = explode(" ", $config['system']['webgui']['althostnames']); foreach ($althosts as $ah) -- cgit v1.1