Skip to content

Commit

Permalink
Fix email verification request (#45227)
Browse files Browse the repository at this point in the history
  • Loading branch information
axlon committed Dec 8, 2022
1 parent 36c2292 commit 2f3879e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Foundation/Auth/EmailVerificationRequest.php
Expand Up @@ -14,13 +14,13 @@ class EmailVerificationRequest extends FormRequest
*/
public function authorize()
{
if (! hash_equals((string) $this->route('id'),
(string) $this->user()->getKey())) {
if (! hash_equals((string) $this->user()->getKey(),
(string) $this->route('id'))) {
return false;
}

if (! hash_equals((string) $this->route('hash'),
sha1($this->user()->getEmailForVerification()))) {
if (! hash_equals(sha1($this->user()->getEmailForVerification()),
(string) $this->route('hash'))) {
return false;
}

Expand Down

0 comments on commit 2f3879e

Please sign in to comment.