Fix uninitialized client IP address. Thanks to Wuerr Marcus
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 28 Jan 2015 04:45:04 +0000 (04:45 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 28 Jan 2015 04:45:04 +0000 (04:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14499 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/configtest.php

index 3ce6539065c92a733cbf30b2063fc79e0bedb49d..8356ebebe3da9bc0bbadec8bf6f5e669a768e8d2 100644 (file)
@@ -120,6 +120,9 @@ if (file_exists(SM_PATH . 'config/config_local.php')) {
     require(SM_PATH . 'config/config_local.php');
 }
 
+sqGetGlobalVar('REMOTE_ADDR',$client_ip,SQ_SERVER);
+sqGetGlobalVar('SERVER_ADDR',$server_ip,SQ_SERVER);
+
 /**
  * Include Compatibility plugin if available.
  */
@@ -175,8 +178,6 @@ if(!in_array('strings.php', $included)) {
 
 /* Block remote use of script */
 if (! $allow_remote_configtest) {
-    sqGetGlobalVar('REMOTE_ADDR',$client_ip,SQ_SERVER);
-    sqGetGlobalVar('SERVER_ADDR',$server_ip,SQ_SERVER);
 
     if ((! isset($client_ip) || $client_ip!='127.0.0.1') &&
             (! isset($client_ip) || ! isset($server_ip) || $client_ip!=$server_ip)) {