From 23c618e1c95dc28b0c77f6bd5d3a2515c79791db Mon Sep 17 00:00:00 2001 From: Martin Tietz <146931750+matietz@users.noreply.github.com> Date: Fri, 17 Nov 2023 12:00:04 +0100 Subject: [PATCH] Fix more data type mismatch when checking OAUTH2 claims --- web/pgadmin/authenticate/oauth2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/pgadmin/authenticate/oauth2.py b/web/pgadmin/authenticate/oauth2.py index 3439dcaa1..8637754fb 100644 --- a/web/pgadmin/authenticate/oauth2.py +++ b/web/pgadmin/authenticate/oauth2.py @@ -243,6 +243,8 @@ class OAuth2Authentication(BaseAuthentication): if not isinstance(claim, list): claim = [claim] authorized_claims = additional_claims.get(key) + if not isinstance(authorized_claims, list): + authorized_claims = [authorized_claims] if any(item in authorized_claims for item in claim): reason = "Claim match found. Authorizing" return (True, reason)