mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
refactoring
This commit is contained in:
@@ -77,8 +77,8 @@ class AuthManager:
|
||||
assert self.__internal_service
|
||||
|
||||
if self.__totp_secret_path:
|
||||
with open(self.__totp_secret_path) as secret_file:
|
||||
secret = secret_file.read().strip()
|
||||
with open(self.__totp_secret_path) as file:
|
||||
secret = file.read().strip()
|
||||
if secret:
|
||||
code = passwd[-6:]
|
||||
if not pyotp.TOTP(secret).verify(code):
|
||||
|
||||
Reference in New Issue
Block a user