Merge pull request #1515 from WangEdward/main
This commit is contained in:
commit
5b563cf173
@ -19,6 +19,8 @@ class TwoFactorAuth:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __calc(secret_key: str) -> str:
|
def __calc(secret_key: str) -> str:
|
||||||
|
if not secret_key:
|
||||||
|
return ""
|
||||||
try:
|
try:
|
||||||
input_time = int(time.time()) // 30
|
input_time = int(time.time()) // 30
|
||||||
key = base64.b32decode(secret_key)
|
key = base64.b32decode(secret_key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user