fix: 管理员默认口令改为六位默认值

This commit is contained in:
Nixevol
2026-11-17 21:49:11 +08:00
parent 425b20a4f0
commit 305d458334
5 changed files with 30 additions and 23 deletions
+8 -3
View File
@@ -10,7 +10,8 @@ _N = 2**14
_R = 8
_P = 1
_PREFIX = "scrypt$"
_LEGACY_PASSWORD = "242520"
_DEFAULT_PASSWORD = "242520"
_MIN_LENGTH = 6
def hash_password(password: str) -> str:
@@ -34,5 +35,9 @@ def is_hashed(stored: str) -> bool:
return stored.startswith(_PREFIX)
def legacy_password() -> str:
return _LEGACY_PASSWORD
def default_password() -> str:
return _DEFAULT_PASSWORD
def min_length() -> int:
return _MIN_LENGTH