Commit 5d238412 authored by Franco Fichtner's avatar Franco Fichtner

www: prepare to die! fix validation code now that issue is triggered

PR: https://forum.opnsense.org/index.php?topic=3824
parent b7f42188
......@@ -168,10 +168,7 @@ function do_input_validation($postdata, $reqdfields, $reqdfieldsn, &$input_error
}
for ($i = 0; $i < count($reqdfields); $i++) {
// why.. do you want to do this? we send data to validate and then validate something else....
// can't now for sure if any page uses this wrong behaviour, but it should die eventually.
// TODO: kill
if (empty($_POST[$reqdfields[$i]]) && empty($_REQUEST[$reqdfields[$i]])) {
if (empty($postdata[$reqdfields[$i]])) {
$input_errors[] = sprintf(gettext("The field %s is required."), $reqdfieldsn[$i]);
}
}
......
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