Skip to content

Commit

Permalink
www: prepare to die! fix validation code now that issue is triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Oct 23, 2016
1 parent b7f4218 commit 5d23841
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/www/guiconfig.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}
Expand Down

0 comments on commit 5d23841

Please sign in to comment.