summary refs log tree commit diff
path: root/synapse/rest/profile.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-12 15:05:37 +0000
committerErik Johnston <erik@matrix.org>2014-12-12 15:05:37 +0000
commit7b43a503f31e47b0eae9fe2b12fbea5e7fd280f5 (patch)
treecd4846d41b43bc9e5964693fa072b2860507c9ae /synapse/rest/profile.py
parentStore json as UTF-8 and not bytes (diff)
downloadsynapse-7b43a503f31e47b0eae9fe2b12fbea5e7fd280f5.tar.xz
Consistently url decode and decode as utf 8 the URL parts
Diffstat (limited to 'synapse/rest/profile.py')
-rw-r--r--synapse/rest/profile.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/synapse/rest/profile.py b/synapse/rest/profile.py
index 72e02d8dd8..fa1be2c289 100644
--- a/synapse/rest/profile.py
+++ b/synapse/rest/profile.py
@@ -27,7 +27,6 @@ class ProfileDisplaynameRestServlet(RestServlet):
 
     @defer.inlineCallbacks
     def on_GET(self, request, user_id):
-        user_id = urllib.unquote(user_id)
         user = self.hs.parse_userid(user_id)
 
         displayname = yield self.handlers.profile_handler.get_displayname(
@@ -39,7 +38,6 @@ class ProfileDisplaynameRestServlet(RestServlet):
     @defer.inlineCallbacks
     def on_PUT(self, request, user_id):
         auth_user = yield self.auth.get_user_by_req(request)
-        user_id = urllib.unquote(user_id)
         user = self.hs.parse_userid(user_id)
 
         try:
@@ -62,7 +60,6 @@ class ProfileAvatarURLRestServlet(RestServlet):
 
     @defer.inlineCallbacks
     def on_GET(self, request, user_id):
-        user_id = urllib.unquote(user_id)
         user = self.hs.parse_userid(user_id)
 
         avatar_url = yield self.handlers.profile_handler.get_avatar_url(
@@ -74,7 +71,6 @@ class ProfileAvatarURLRestServlet(RestServlet):
     @defer.inlineCallbacks
     def on_PUT(self, request, user_id):
         auth_user = yield self.auth.get_user_by_req(request)
-        user_id = urllib.unquote(user_id)
         user = self.hs.parse_userid(user_id)
 
         try:
@@ -97,7 +93,6 @@ class ProfileRestServlet(RestServlet):
 
     @defer.inlineCallbacks
     def on_GET(self, request, user_id):
-        user_id = urllib.unquote(user_id)
         user = self.hs.parse_userid(user_id)
 
         displayname = yield self.handlers.profile_handler.get_displayname(