mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Simplify the input validation condition for protocol
This commit is contained in:
parent
8c4ee06242
commit
e88ea3445f
@ -83,14 +83,7 @@ if ($_POST) {
|
||||
if ($fam !== "" && $fam !== "ip" && $fam !== "ip6") {
|
||||
$input_errors[] = gettext("Invalid address family.");
|
||||
}
|
||||
if ($proto !== "" &&
|
||||
$proto !== "icmp" &&
|
||||
$proto !== "icmp6" &&
|
||||
$proto !== "tcp" &&
|
||||
$proto !== "udp" &&
|
||||
$proto !== "arp" &&
|
||||
$proto !== "carp" &&
|
||||
$proto !== "esp") {
|
||||
if ($proto !== "" && !in_array($proto, $protos)) {
|
||||
$input_errors[] = gettext("Invalid protocol.");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user