Commit 0b0e64e1 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(firewall/npt) add ip/alias input validation

(cherry picked from commit e584db96)
parent 6b396b41
......@@ -129,6 +129,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
do_input_validation($pconfig, $reqdfields, $reqdfieldsn, $input_errors);
if (!is_ipaddroralias($pconfig['src'])) {
$input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."), $pconfig['src']);
}
if (!is_ipaddroralias($pconfig['dst'])) {
$input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."), $pconfig['dst']);
}
if (count($input_errors) == 0) {
$natent = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment