mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
Merge pull request #272 from tmuncks/fix-otp-validation
Fix OTP validation
This commit is contained in:
commit
36bf492cb6
@ -365,7 +365,7 @@ def login():
|
||||
|
||||
# check if user enabled OPT authentication
|
||||
if user.otp_secret:
|
||||
if otp_token and isinstance(otp_token, int):
|
||||
if otp_token and otp_token.isdigit():
|
||||
good_token = user.verify_totp(otp_token)
|
||||
if not good_token:
|
||||
return render_template('login.html', error='Invalid credentials',
|
||||
|
Loading…
Reference in New Issue
Block a user