Skip to content

Commit 0dce3b8

Browse files
authored
Merge pull request #15987 from spencerrlongg/bug/sc-27192
Add `string` to Password Reset Username Rules
2 parents 04c3481 + 5042c2b commit 0dce3b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Http/Controllers/Auth/ForgotPasswordController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ public function getEmailSubject()
5050
*/
5151
public function sendResetLinkEmail(Request $request)
5252
{
53-
5453
/**
5554
* Let's set a max character count here to prevent potential
5655
* buffer overflow issues with attackers sending very large
57-
* payloads through.
56+
* payloads through. The addition of the string rule prevents attackers
57+
* sending arrays through and causing 500s
5858
*/
5959
$request->validate([
60-
'username' => ['required', 'max:255'],
60+
'username' => ['required', 'max:255', 'string'],
6161
]);
6262

6363
/**

0 commit comments

Comments
 (0)