ignore case comparing passwords

This commit is contained in:
Antonio J. Delgado 2024-11-18 08:35:21 +02:00
parent 8f7f31c67c
commit 20523ff5a3

View file

@ -941,8 +941,16 @@ class NextcloudHandler:
def is_same_key(self, key, dict1, dict2): def is_same_key(self, key, dict1, dict2):
'''Test if two dictionaries have the same key with the same value''' '''Test if two dictionaries have the same key with the same value'''
if key in dict1 and key in dict2: if (
if dict1[key] == dict2[key]: (key in dict1 or key.lower() in dict1) and
(key in dict2 or key.lower() in dict2)
):
if (
dict1[key] == dict2[key] or
dict1[key.lower()] == dict2[key] or
dict1[key.lower()] == dict2[key.lower()] or
dict1[key] == dict2[key.lower()]
):
return True return True
return False return False