summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-11-12 17:26:38 (GMT)
committerChris Buechler <cmb@pfsense.org>2014-11-12 17:26:38 (GMT)
commit71f45fedec7f6e3c14413d88a92ae1fba6f6900e (patch)
tree29dad9bd38b9946a109a2ab8ee715a53938003d9
parenta19cc6007c9a9c0a5b8b2148ceb7b4395e807948 (diff)
downloadunivnautes-71f45fedec7f6e3c14413d88a92ae1fba6f6900e.zip
univnautes-71f45fedec7f6e3c14413d88a92ae1fba6f6900e.tar.gz
univnautes-71f45fedec7f6e3c14413d88a92ae1fba6f6900e.tar.bz2
Don't allow interface descriptions that are strictly numbers as that
generates an invalid ruleset. Ticket #4005
-rw-r--r--usr/local/www/interfaces.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7e923aa..6aaf99a 100644
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -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.");