Anchor the regexp. Thanks Thijs Kinkhorst.
[squirrelmail.git] / src / configtest.php
index 261ed2f874d1e63a4e546998060241b0a398c7a5..030acf2daa641f4f0b2b2d138096aa28ba7cdbdf 100644 (file)
@@ -625,7 +625,7 @@ if($useSendmail) {
 
         // format EHLO argument correctly if needed
         //
-        if (preg_match('/\d+\.\d+\.\d+\.\d+/', $client_ip))
+        if (preg_match('/^\d+\.\d+\.\d+\.\d+$/', $client_ip))
             $helohost = '[' . $client_ip . ']';
         else // some day might add IPv6 here
             $helohost = $client_ip;