Don't allow interface descriptions that are strictly numbers as that

generates an invalid ruleset. Ticket #4005
This commit is contained in:
Chris Buechler 2014-11-12 11:26:38 -06:00
parent a19cc6007c
commit 71f45fedec
1 changed files with 3 additions and 0 deletions

View File

@ -502,6 +502,9 @@ if ($_POST['apply']) {
break;
}
}
if(is_numeric($_POST['descr'])) {
$input_errors[] = gettext("The interface description cannot contain only numbers.");
}
/* input validation */
if (isset($config['dhcpd']) && isset($config['dhcpd'][$if]['enable']) && (! preg_match("/^staticv4/", $_POST['type'])))
$input_errors[] = gettext("The DHCP Server is active on this interface and it can be used only with a static IP configuration. Please disable the DHCP Server service on this interface first, then change the interface configuration.");