diff options
author | jim-p <jimp@netgate.com> | 2019-01-29 11:11:13 -0500 |
---|---|---|
committer | jim-p <jimp@netgate.com> | 2019-01-29 14:23:04 -0500 |
commit | 587c2d557612ccfa856b2ca47799429cab0fce88 (patch) | |
tree | 09a8fb0f300d9a418355ae21492c28e19947a229 /src/usr/local/www | |
parent | 10b06be56c6860f5ac7b890d58c0c3cca8639c63 (diff) | |
download | pfsense-587c2d557612ccfa856b2ca47799429cab0fce88.zip pfsense-587c2d557612ccfa856b2ca47799429cab0fce88.tar.gz |
Validate submitted interfaces. Issue #9294
(cherry picked from commit 5cc7d21dc08be6c65a2bf7f8f4481dc13f4ae115)
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/interfaces_assign.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/usr/local/www/interfaces_assign.php b/src/usr/local/www/interfaces_assign.php index 5d42b95..fd44048 100644 --- a/src/usr/local/www/interfaces_assign.php +++ b/src/usr/local/www/interfaces_assign.php @@ -251,7 +251,11 @@ if (isset($_REQUEST['add']) && isset($_REQUEST['if_add'])) { build a list of port-to-interface mappings in portifmap */ foreach ($_POST as $ifname => $ifport) { if (($ifname == 'lan') || ($ifname == 'wan') || (substr($ifname, 0, 3) == 'opt')) { - $portifmap[$ifport][] = strtoupper($ifname); + if (array_key_exists($ifport, $portlist)) { + $portifmap[$ifport][] = strtoupper($ifname); + } else { + $input_errors[] = sprintf(gettext('Cannot set port %1$s because the submitted interface does not exist.'), $ifname); + } } } |