fix: 拒绝过短密钥,并把对外端口只留在本机
This commit is contained in:
@@ -463,7 +463,14 @@ def _refresh_one(employee_id: str, attempts: int, client_factory) -> None:
|
||||
client = None
|
||||
continue
|
||||
raise
|
||||
except Exception:
|
||||
except Exception as exc:
|
||||
from cryptography.fernet import InvalidToken
|
||||
|
||||
if isinstance(exc, InvalidToken):
|
||||
import logging
|
||||
|
||||
logging.getLogger("euniv.service").exception("账号 %s 的密文无法用当前密钥解开", employee_id)
|
||||
return
|
||||
db.rollback()
|
||||
valid = False
|
||||
account = db.get(Account, employee_id)
|
||||
|
||||
Reference in New Issue
Block a user