diff options
author | Mohit Rathee <mohit.rathee2505@gmail.com> | 2023-08-01 18:44:02 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-01 09:14:02 -0400 |
commit | 5eb3fd785bdbf2ae07031f13a6ac5fb578adc338 (patch) | |
tree | 95c637b7dc13357cc8ac2e620a51d480e1e2ad46 /synapse/handlers | |
parent | Add metrics tracking for eviction to ResponseCache (#16028) (diff) | |
download | synapse-5eb3fd785bdbf2ae07031f13a6ac5fb578adc338.tar.xz |
Trim whitespace when setting display names (#16031)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/profile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index c7fe101cd9..c2109036ec 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -163,7 +163,7 @@ class ProfileHandler: 400, "Displayname is too long (max %i)" % (MAX_DISPLAYNAME_LEN,) ) - displayname_to_set: Optional[str] = new_displayname + displayname_to_set: Optional[str] = new_displayname.strip() if new_displayname == "": displayname_to_set = None |