mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
www: prepare to die! fix validation code now that issue is triggered
PR: https://forum.opnsense.org/index.php?topic=3824
This commit is contained in:
parent
b7f4218827
commit
5d238412ae
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user