summary refs log tree commit diff
path: root/synapse/rest/profile.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-03 11:59:57 +0100
committerErik Johnston <erik@matrix.org>2014-09-03 12:01:14 +0100
commitb50ea730b15706d0e2099f94cf8b3cf24b5c5433 (patch)
tree05fb4bb1190f0f2223de49bf17060481a8bfad70 /synapse/rest/profile.py
parentAdd option to change content repo location (diff)
parentEdited /presence REST servlet to raise SynapseErrors to return a standard err... (diff)
downloadsynapse-b50ea730b15706d0e2099f94cf8b3cf24b5c5433.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into develop
Conflicts:
	synapse/http/server.py
        synapse/http/content_repository.py
Diffstat (limited to '')
-rw-r--r--synapse/rest/profile.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/rest/profile.py b/synapse/rest/profile.py
index 06076667c7..c4a0a8d260 100644
--- a/synapse/rest/profile.py
+++ b/synapse/rest/profile.py
@@ -19,6 +19,7 @@ from twisted.internet import defer
 from base import RestServlet, client_path_pattern
 
 import json
+import urllib
 
 
 class ProfileDisplaynameRestServlet(RestServlet):
@@ -26,6 +27,7 @@ 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(
@@ -37,6 +39,7 @@ 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:
@@ -59,6 +62,7 @@ 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(
@@ -70,6 +74,7 @@ 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:
@@ -92,6 +97,7 @@ 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(