Skip to content

Commit eed24a4

Browse files
authored
fix: only validate data from POST request body
With the current data validation check, an empty POST request with valid GET parameters will cause the validation to pass later when data is fetched from POST request body, it will be null.
1 parent a96ccdf commit eed24a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controllers/MagicLinkController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function loginAction()
6565
{
6666
// Validate email format
6767
$rules = $this->getValidationRules();
68-
if (! $this->validate($rules)) {
68+
if (! $this->validateData($this->request->getPost(), $rules)) {
6969
return redirect()->route('magic-link')->with('errors', $this->validator->getErrors());
7070
}
7171

0 commit comments

Comments
 (0)