mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Validate submitted interfaces. Issue #9294
This commit is contained in:
parent
56888f24ca
commit
5cc7d21dc0
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user