diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-09-20 11:14:06 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-09-20 11:20:38 +0100 |
commit | 6354a27126ab1570090a1c3b974480abcf15fdf5 (patch) | |
tree | 598e27a8e46d1603798edfd9ce64b6f69dfe216d | |
parent | Merge commit '33757bad1' into erikj/modular_1.3.2_prerelease (diff) | |
download | synapse-6354a27126ab1570090a1c3b974480abcf15fdf5.tar.xz |
truncate displayname at @, too
-rw-r--r-- | synapse/handlers/saml_handler.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/saml_handler.py b/synapse/handlers/saml_handler.py index cc9e6b9bd0..7cca1396a4 100644 --- a/synapse/handlers/saml_handler.py +++ b/synapse/handlers/saml_handler.py @@ -134,6 +134,12 @@ class SamlHandler: displayName = saml2_auth.ava.get("displayName", [None])[0] + # mozilla-specific hack: truncate at @ + if displayName: + pos = displayName.find("@") + if pos >= 0: + displayName = displayName[:pos] + with (await self._mapping_lock.queue(self._auth_provider_id)): # first of all, check if we already have a mapping for this user logger.info( |