Skip to content

Commit a96ccdf

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 but credentials which are later fetched from POST request body will be null.
1 parent 60105c7 commit a96ccdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controllers/LoginController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function loginAction(): RedirectResponse
4747
// like the password, can only be validated properly here.
4848
$rules = $this->getValidationRules();
4949

50-
if (! $this->validate($rules)) {
50+
if (! $this->validateData($this->request->getPost(), $rules)) {
5151
return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());
5252
}
5353

0 commit comments

Comments
 (0)