mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-14 01:20:27 +00:00
Merge pull request #256 from rene-dekkers/nonint_error
Fail when non-numeric otp token was inserted
This commit is contained in:
commit
4daf6f72a7
@ -365,7 +365,7 @@ def login():
|
|||||||
|
|
||||||
# check if user enabled OPT authentication
|
# check if user enabled OPT authentication
|
||||||
if user.otp_secret:
|
if user.otp_secret:
|
||||||
if otp_token:
|
if otp_token and isinstance(otp_token, int):
|
||||||
good_token = user.verify_totp(otp_token)
|
good_token = user.verify_totp(otp_token)
|
||||||
if not good_token:
|
if not good_token:
|
||||||
return render_template('login.html', error='Invalid credentials',
|
return render_template('login.html', error='Invalid credentials',
|
||||||
|
Loading…
Reference in New Issue
Block a user