summary refs log tree commit diff
path: root/synapse/handlers/profile.py
diff options
context:
space:
mode:
authorMohit Rathee <mohit.rathee2505@gmail.com>2023-08-01 18:44:02 +0530
committerGitHub <noreply@github.com>2023-08-01 09:14:02 -0400
commit5eb3fd785bdbf2ae07031f13a6ac5fb578adc338 (patch)
tree95c637b7dc13357cc8ac2e620a51d480e1e2ad46 /synapse/handlers/profile.py
parentAdd metrics tracking for eviction to ResponseCache (#16028) (diff)
downloadsynapse-5eb3fd785bdbf2ae07031f13a6ac5fb578adc338.tar.xz
Trim whitespace when setting display names (#16031)
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r--synapse/handlers/profile.py2
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