Fix more data type mismatch when checking OAUTH2 claims

This commit is contained in:
Martin Tietz 2023-11-17 12:00:04 +01:00 committed by GitHub
parent 0bc044fa67
commit 23c618e1c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)