fix: 管理员口令改为哈希并限制连续失败
This commit is contained in:
@@ -11,6 +11,8 @@ _root.mkdir(parents=True, exist_ok=True)
|
||||
os.environ["EUNIV_SECRET_KEY"] = "test-secret-key"
|
||||
os.environ["EUNIV_DB_PATH"] = str(_root / "euniv.db")
|
||||
os.environ["EUNIV_DISABLE_REFRESH"] = "1"
|
||||
os.environ["EUNIV_ADMIN_PASSWORD"] = "test-admin-pass"
|
||||
os.environ.pop("EUNIV_ADMIN_RESET", None)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
@@ -32,6 +34,9 @@ def fresh_database():
|
||||
init_db()
|
||||
ensure_admin_seed()
|
||||
load_admin_identity()
|
||||
from admin.login_limit import reset
|
||||
|
||||
reset()
|
||||
from euniv.proxy_pool import _holds
|
||||
|
||||
_holds.clear()
|
||||
|
||||
Reference in New Issue
Block a user