Merge pull request #1515 from WangEdward/main

This commit is contained in:
jxxghp 2024-02-21 15:18:38 +08:00 committed by GitHub
commit 5b563cf173
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)