-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Internal server error when trying to log in with OIDC when external ID is a number #7795
Comments
As a sidenote, the main occurrence of that is if the localpart is a number, in which case we'll likely also run into other issues given Synapse reserves such localparts to guest users. It might not be an issue, but it would be nice to check when getting around to fixing this. |
The synapse OpenID config I used on Modular was:
The reproduced crash in Kibana, for those who have access: |
For what it's worth, I believe we expect the mapping providers to return strings, but we should probably assert this somewhere. |
I'm assuming there's more to it than that? Presumably this isn't always happening, otherwise the OIDC support would be useless? |
My understanding is that this happens when the external ID is a number. I've updated the title. |
get_user_by_external_id
retrieves an MXID from the ID sent by the authentication portal when using SSO.In this function, we expect
external_id
to be a string, however we don't make sure the SSO portal returns with one. We should either add a check to both of the two places this function is called from to make sure the external ID is a string, or change that function to do that (e.g. if the ID isn't a string, try to cast it as such and error in a nicer way if it's not possible).Sentry issue: https://sentry.matrix.org/sentry/synapse-modular/issues/116450/
The text was updated successfully, but these errors were encountered: