mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
refactor: remove unused is_legacy_dashboard_password_hash
Remove the dead is_legacy_dashboard_password_hash helper which was never used by verify_dashboard_password. Legacy SHA-256/MD5 hashes are not supported - only Argon2 and PBKDF2 are valid password hashes. Users with old SHA-256 hashes must reset their password.
This commit is contained in:
@@ -95,16 +95,6 @@ def is_dashboard_password_hash(value: str) -> bool:
|
||||
return value.startswith("$argon2") or value.startswith("pbkdf2_sha256$")
|
||||
|
||||
|
||||
def is_legacy_dashboard_password_hash(value: str) -> bool:
|
||||
"""
|
||||
Return True when `value` looks like an old dashboard password hash format.
|
||||
"""
|
||||
if not isinstance(value, str) or not value:
|
||||
return False
|
||||
value_l = value.lower()
|
||||
return len(value_l) in {32, 64} and all(ch in "0123456789abcdef" for ch in value_l)
|
||||
|
||||
|
||||
# --- Validators for CLI configuration items ---
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user