From 20523ff5a3eef562fb915ae857073b18ef439ed9 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 18 Nov 2024 08:35:21 +0200 Subject: [PATCH] ignore case comparing passwords --- nc_password_client/nc_password_client.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nc_password_client/nc_password_client.py b/nc_password_client/nc_password_client.py index bae92ea..832758b 100755 --- a/nc_password_client/nc_password_client.py +++ b/nc_password_client/nc_password_client.py @@ -941,8 +941,16 @@ class NextcloudHandler: def is_same_key(self, key, dict1, dict2): '''Test if two dictionaries have the same key with the same value''' - if key in dict1 and key in dict2: - if dict1[key] == dict2[key]: + if ( + (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 False