From: kkalev Date: Mon, 14 Mar 2005 11:57:34 +0000 (+0000) Subject: Correctly check nas validity in nas_admin.php3. Bug noted by Nick Bright X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=d76f863412fb9677f5ba7eb304afa7c1199757b1;p=freeradius-dialup-admin.git Correctly check nas validity in nas_admin.php3. Bug noted by Nick Bright --- diff --git a/Changelog b/Changelog index a06dc5d..95ca0de 100644 --- a/Changelog +++ b/Changelog @@ -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). diff --git a/htdocs/nas_admin.php3 b/htdocs/nas_admin.php3 index 9390198..f2bb7f0 100644 --- a/htdocs/nas_admin.php3 +++ b/htdocs/nas_admin.php3 @@ -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 = "The NAS name is not valid
\n"; else $msg = "The NAS name is valid
\n";