Commit e5878aff authored by Ad Schellevis's avatar Ad Schellevis

(legacy) remove encoding validation in nat.._edit, closes...

(legacy) remove encoding validation in nat.._edit, closes https://github.com/opnsense/core/issues/671
parent 20197cab
......@@ -157,12 +157,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
// validate input
foreach ($pconfig as $key => $value) {
if($value <> htmlentities($value))
$input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."),htmlentities($value));
}
/* input validation */
$reqdfields = explode(" ", "interface external src dst");
$reqdfieldsn = array(gettext("Interface"), gettext("External subnet"), gettext("Source address"), gettext("Destination address"));
......
......@@ -185,12 +185,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
/* Validate input data */
foreach ($pconfig as $key => $value) {
if(htmlentities($value) <> $value) {
$input_errors[] = sprintf(gettext("Invalid characters detected %s. Please remove invalid characters and save again."), htmlentities($value));
}
}
if( $pconfig['protocol'] == "tcp" || $pconfig['protocol'] == "udp" || $pconfig['protocol'] == "tcp/udp") {
$reqdfields = explode(" ", "interface protocol dstbeginport dstendport");
$reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("Destination port from"),gettext("Destination port to"));
......
......@@ -182,11 +182,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
/* input validation */
foreach ($pconfig as $key => $value) {
if(htmlentities($value) <> $value) {
$input_errors[] = sprintf(gettext("Invalid characters detected %s. Please remove invalid characters and save again."), htmlentities($value));
}
}
$reqdfields = explode(" ", "interface protocol source source_subnet destination destination_subnet");
$reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("Source"),gettext("Source bit count"),gettext("Destination"),gettext("Destination bit count"));
......
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