fix: 管理员口令改为哈希并限制连续失败

This commit is contained in:
2026-11-16 02:35:15 +08:00
parent 77f80ad0e1
commit 0fbc3146d8
11 changed files with 209 additions and 26 deletions
+5
View File
@@ -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()