From 0138d49256d63c6c7ad76cced640e656bcc54326 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 14 Aug 2005 17:50:19 +0000 Subject: Enforce bandwidth values Ticket #347 --- usr/local/www/interfaces.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'usr/local/www/interfaces.php') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 3bcb47e..30b8388 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -168,6 +168,9 @@ if ($_POST) { if ($_POST['mtu'] && (($_POST['mtu'] < 576) || ($_POST['mtu'] > 1500))) { $input_errors[] = "The MTU must be between 576 and 1500 bytes."; } + if($_POST['bandwidth'] <> "" && !is_numeric($_POST['bandwidth'])) { + $input_errors[] = "A valid bandwidth value is required 1-999999."; + } /* Wireless interface? */ if (isset($wancfg['wireless'])) { -- cgit v1.1