mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 04:19:03 +00:00
@@ -19,8 +19,8 @@ def password_for_validating(password):
|
||||
for _ in range(100):
|
||||
password = hashlib.sha256(password.encode()).hexdigest()
|
||||
try:
|
||||
return sum(map(int, RE_DIGITS.findall(password)))
|
||||
except ValueError:
|
||||
return int(str(sum(map(int, RE_DIGITS.findall(password))))[0])
|
||||
except (ValueError, IndexError):
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user