✅(backend) handle empty subscription string
Handle case where sub value is an empty string instead of None. Previously this edge case would cause unexpected behavior. Related to previous commit that added the test coverage.
This commit is contained in:
committed by
aleb_the_flash
parent
ccbeeba68f
commit
11cd85d4eb
@@ -66,7 +66,7 @@ class OIDCAuthenticationBackend(MozillaOIDCAuthenticationBackend):
|
||||
user_info = self.get_userinfo(access_token, id_token, payload)
|
||||
sub = user_info.get("sub")
|
||||
|
||||
if sub is None:
|
||||
if not sub:
|
||||
raise SuspiciousOperation(
|
||||
_("User info contained no recognizable user identification")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user