Ensure that the OpenID Connect remote ID is a string. (#8190)

This commit is contained in:
Patrick Cloke 2020-08-28 08:56:36 -04:00 committed by GitHub
parent 5c03134d0f
commit b055dc9322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 2 deletions

View file

@ -869,6 +869,9 @@ class OidcHandler:
raise MappingException(
"Failed to extract subject from OIDC response: %s" % (e,)
)
# Some OIDC providers use integer IDs, but Synapse expects external IDs
# to be strings.
remote_user_id = str(remote_user_id)
logger.info(
"Looking for existing mapping for user %s:%s",