backwarts compaibility and integration of encryption in the manage-tenant.sh

This commit is contained in:
2026-07-31 20:45:16 +02:00
parent 08d8b78d91
commit 88f6c3c0f5
2 changed files with 11 additions and 6 deletions
+6 -2
View File
@@ -476,8 +476,12 @@ def check_nm_pwd(username, password):
user_record = users.find_one(query)
if user_record is None:
logger.warning("Kein Benutzer für %r in DB %r gefunden.", dp.encrypt_text(username), db_name)
return None
query = {'$or': [{'Username': username}, {'username': username}]}
user_record_fallback = users.find_one(query)
if user_record_fallback is None:
logger.warning("Kein Benutzer für %r in DB %r gefunden.", dp.encrypt_text(username), db_name)
return None
stored_password = user_record.get('Password') or user_record.get('password')