From 11cb2acf30e3d04e736135a244a5c3582b6900a4 Mon Sep 17 00:00:00 2001 From: "Mike A." Date: Tue, 3 Sep 2024 17:20:00 +0200 Subject: [PATCH] fix: Pass pre-commit check --- findmy/reports/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/findmy/reports/account.py b/findmy/reports/account.py index aaa4163..5cc5374 100644 --- a/findmy/reports/account.py +++ b/findmy/reports/account.py @@ -734,7 +734,7 @@ async def _gsa_authenticate( msg = "Email verification failed: " + r["Status"].get("em") raise InvalidCredentialsError(msg) sp = r.get("sp") - if sp not in ["s2k", "s2k_fo"]: + if not isinstance(sp, str) or sp not in {"s2k", "s2k_fo"}: msg = f"This implementation only supports s2k and sk2_fo. Server returned {sp}" raise UnhandledProtocolError(msg)