From 5bdccb6e633224dfcee896df7622d50a00e36b64 Mon Sep 17 00:00:00 2001 From: Martin Tietz <146931750+matietz@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:48:07 +0100 Subject: [PATCH] Fix a 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 5fcbfedbb..3439dcaa1 100644 --- a/web/pgadmin/authenticate/oauth2.py +++ b/web/pgadmin/authenticate/oauth2.py @@ -240,6 +240,8 @@ class OAuth2Authentication(BaseAuthentication): claim = profile.get(key) if claim is None: continue + if not isinstance(claim, list): + claim = [claim] authorized_claims = additional_claims.get(key) if any(item in authorized_claims for item in claim): reason = "Claim match found. Authorizing"