Skip to content

Commit 60105c7

Browse files
authored
fix: accept only valid data from POST
With the current data validation check, an empty POST request with valid GET parameters will cause the validation to pass but a TypeError will be thrown because on line 110 it is fetching null data from POST.
1 parent a5096be commit 60105c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controllers/RegisterController.php

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

103-
if (! $this->validate($rules)) {
103+
if (! $this->validateData($this->request->getPost(), $rules)) {
104104
return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());
105105
}
106106

0 commit comments

Comments
 (0)