Only allow up to 30 seconds of overlap on comparing the 2FA tokens.

This commit is contained in:
Dane Everitt 2017-02-01 23:02:54 -05:00
parent 4abdee0efb
commit a93adce303
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -157,7 +157,7 @@ class LoginController extends Controller
} }
if (! is_null($request->input('2fa_token')) && $G2FA->verifyKey($user->totp_secret, $request->input('2fa_token'))) { if (! is_null($request->input('2fa_token')) && $G2FA->verifyKey($user->totp_secret, $request->input('2fa_token'), 1)) {
Auth::login($user, $request->has('remember')); Auth::login($user, $request->has('remember'));
return redirect()->intended($this->redirectPath()); return redirect()->intended($this->redirectPath());