mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
Fix for when TOTP starts with 0
PyOTP wants the token as a string, by passing it as an int leading 0s get stripped and verification fails
This commit is contained in:
parent
6395d81916
commit
c7d43ce5cc
@ -90,7 +90,7 @@ class User(db.Model):
|
||||
|
||||
def verify_totp(self, token):
|
||||
totp = pyotp.TOTP(self.otp_secret)
|
||||
return totp.verify(int(token))
|
||||
return totp.verify(token)
|
||||
|
||||
def get_hashed_password(self, plain_text_password=None):
|
||||
# Hash a password for the first time
|
||||
|
Loading…
Reference in New Issue
Block a user