Skip to content

Commit

Permalink
Important Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunetsiz committed Feb 6, 2025
1 parent e2592e2 commit a92747f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public function login(Request $request)
session()->forget('captcha_code');

$credentials = $request->only('username', 'password');
$user = User::where('username', $credentials['username'])->first();
$user = User::whereRaw('BINARY username = ?', [$credentials['username']])->first();

if (!$user || !Hash::check($credentials['password'], $user->password)) {
return back()->withErrors([
Expand Down Expand Up @@ -447,7 +447,7 @@ public function verifyMnemonic(Request $request)
'mnemonic.max' => 'Mnemonic phrase cannot be longer than 512 characters.',
]);

$user = User::where('username', $request->username)->first();
$user = User::whereRaw('BINARY username = ?', [$request->username])->first();

if (!$user || !$this->verifyMnemonicPhrase($request->mnemonic, $user->mnemonic)) {
return back()->withErrors([
Expand Down Expand Up @@ -631,4 +631,4 @@ protected function generateReferenceId()

return $referenceId;
}
}
}

0 comments on commit a92747f

Please # to comment.