Correctly check nas validity in nas_admin.php3. Bug noted by Nick Bright
authorkkalev <kkalev>
Mon, 14 Mar 2005 11:57:34 +0000 (11:57 +0000)
committerkkalev <kkalev>
Mon, 14 Mar 2005 11:57:34 +0000 (11:57 +0000)
dialup_admin/Changelog
dialup_admin/htdocs/nas_admin.php3

index a06dc5d..95ca0de 100644 (file)
@@ -27,6 +27,7 @@ Ver 1.78:
 * Show the correct nas type in nas_admin. Bug noted by Nick Bright
 * Correctly calculate the nas ip in lib/sql/nas_list.php3. Add a check_ip() function in lib/functions.php3
   Bug noted by Nick Bright
+* Correctly check nas validity in nas_admin.php3. Bug noted by Nick Bright
 Ver 1.75:
 * A LOT of security related fixes. Now dialupadmin should hopefully be secure enough to
   be accessed by normal users (not administrators).
index 9390198..f2bb7f0 100644 (file)
@@ -45,7 +45,7 @@ if ($link){
                $selected_nas = da_sql_escape_string($selected_nas);
                switch ($action) {
                        case 'check_nas':
-                               if ($selected_nas == gethostbyname($selected_nas))
+                               if (!check_ip($selected_nas) && $selected_nas == gethostbyname($selected_nas))
                                        $msg = "<b>The NAS name <font color=red>is not</font> valid</b><br>\n";
                                else
                                        $msg = "<b>The NAS name <font color=green>is</font> valid</b><br>\n";