From 600ef2421a0c0cbf24ba8157c2a341de6500fe33 Mon Sep 17 00:00:00 2001 From: BIZ Factory GmbH Date: Mon, 1 Mar 2021 08:27:38 +0100 Subject: [PATCH] Update TrustedDevice.py add postgresql support --- mfa/TrustedDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mfa/TrustedDevice.py b/mfa/TrustedDevice.py index 94b2136..812e13e 100644 --- a/mfa/TrustedDevice.py +++ b/mfa/TrustedDevice.py @@ -62,7 +62,7 @@ def add(request): key=request.POST["key"].replace("-","").replace(" ","").upper() context["username"] = request.POST["username"] context["key"] = request.POST["key"] - trusted_keys=User_Keys.objects.filter(username=request.POST["username"],properties__has="$.key="+key) + trusted_keys=User_Keys.objects.filter(username=request.POST["username"],properties__iregex=rf'{key}') cookie=False if trusted_keys.exists(): tk=trusted_keys[0]