From df6986ad68293ef67ff84063dbc6865aaab5e43e Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 26 Jun 2006 15:01:20 +0000 Subject: [PATCH] MFC 12516 Allow alphanumeric and - and _ in queue names only per: http://forum.pfsense.org/index.php?topic=1351.0 --- usr/local/www/firewall_shaper_queues_edit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/local/www/firewall_shaper_queues_edit.php b/usr/local/www/firewall_shaper_queues_edit.php index 4405ba9e70..dfe9cb0421 100755 --- a/usr/local/www/firewall_shaper_queues_edit.php +++ b/usr/local/www/firewall_shaper_queues_edit.php @@ -104,6 +104,8 @@ if ($_POST) { || ($_POST['priority'] < 1) || ($_POST['priority'] > 100))) { $input_errors[] = "The priority must be an integer between 1 and 100."; } + if (!preg_match("/^[a-zA-Z0-9_-]*$/", $_POST['name'])) + $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only."); switch($config['shaper']['schedulertype']) { case 'hfsc':