diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-07-11 12:21:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 12:21:00 -0400 |
commit | a4243183f0b500f9f30f2d24af19f30a99f65f63 (patch) | |
tree | f3590f5a33f30f814452f70377a8f1352d02898a /synapse/handlers/sso.py | |
parent | Don't build wheels for Python 3.7 (#15917) (diff) | |
download | synapse-a4243183f0b500f9f30f2d24af19f30a99f65f63.tar.xz |
Add + as an allowed character for Matrix IDs (MSC4009) (#15911)
Diffstat (limited to 'synapse/handlers/sso.py')
-rw-r--r-- | synapse/handlers/sso.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/sso.py b/synapse/handlers/sso.py index c3a51722bd..4d29328a74 100644 --- a/synapse/handlers/sso.py +++ b/synapse/handlers/sso.py @@ -225,8 +225,6 @@ class SsoHandler: self._consent_at_registration = hs.config.consent.user_consent_at_registration - self._e164_mxids = hs.config.experimental.msc4009_e164_mxids - def register_identity_provider(self, p: SsoIdentityProvider) -> None: p_id = p.idp_id assert p_id not in self._identity_providers @@ -713,7 +711,7 @@ class SsoHandler: # Since the localpart is provided via a potentially untrusted module, # ensure the MXID is valid before registering. if not attributes.localpart or contains_invalid_mxid_characters( - attributes.localpart, self._e164_mxids + attributes.localpart ): raise MappingException("localpart is invalid: %s" % (attributes.localpart,)) @@ -946,7 +944,7 @@ class SsoHandler: localpart, ) - if contains_invalid_mxid_characters(localpart, self._e164_mxids): + if contains_invalid_mxid_characters(localpart): raise SynapseError(400, "localpart is invalid: %s" % (localpart,)) user_id = UserID(localpart, self._server_name).to_string() user_infos = await self._store.get_users_by_id_case_insensitive(user_id) |