Skip to content

Commit

Permalink
Fixes to form validation process
Browse files Browse the repository at this point in the history
Fixes hardening measure introduced in joomla#23716
  • Loading branch information
wilsonge committed Dec 22, 2023
1 parent 3265efa commit b810485
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/src/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ protected function bindLevel($group, $data)
}

/**
* Return all errors, if any.
* Return Exceptions thrown during the form validation process.
*
* @return \Exception[] Array of error messages or RuntimeException objects.
* @return \Exception[]
*
* @since 1.7.0
*/
Expand Down Expand Up @@ -1134,6 +1134,7 @@ public function validate($data, $group = null)
// The field returned false from setup and shouldn't be included in the page body - yet we received
// a value for it. This is probably some sort of injection attack and should be rejected
$this->errors[] = new \RuntimeException(Text::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID', $key));
$return = false;
}
}

Expand Down

0 comments on commit b810485

Please sign in to comment.