Skip to content

Commit a93adce

Browse files
committed
Only allow up to 30 seconds of overlap on comparing the 2FA tokens.
1 parent 4abdee0 commit a93adce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Controllers/Auth/LoginController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function totpCheckpoint(Request $request)
157157
}
158158

159159

160-
if (! is_null($request->input('2fa_token')) && $G2FA->verifyKey($user->totp_secret, $request->input('2fa_token'))) {
160+
if (! is_null($request->input('2fa_token')) && $G2FA->verifyKey($user->totp_secret, $request->input('2fa_token'), 1)) {
161161
Auth::login($user, $request->has('remember'));
162162

163163
return redirect()->intended($this->redirectPath());

0 commit comments

Comments
 (0)