1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00

Prevent logins with no password

This commit is contained in:
Florent Daigniere 2021-10-14 18:04:49 +02:00
parent 8c8c1b2015
commit 632ce663ee

View File

@ -562,6 +562,8 @@ class User(Base, Email):
""" verifies password against stored hash
and updates hash if outdated
"""
if password == '':
return False
cache_result = self._credential_cache.get(self.get_id())
current_salt = self.password.split('$')[3] if len(self.password.split('$')) == 5 else None
if cache_result and current_salt: