summary refs log tree commit diff
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-19 11:50:57 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-19 11:50:57 +0100
commitece7a6d995304752f093d8db2aafbf5baca93e90 (patch)
treeac090b790044f284bbe1d431c1ac8b47d145cca4
parentPerform the 'REST'-level tests of Presence against the real Presence handler ... (diff)
downloadsynapse-ece7a6d995304752f093d8db2aafbf5baca93e90.tar.xz
Unquote sender IDs.
-rw-r--r--synapse/rest/room.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py
index 035209a19d..c15eb9de48 100644
--- a/synapse/rest/room.py
+++ b/synapse/rest/room.py
@@ -235,7 +235,7 @@ class MessageRestServlet(RestServlet):
 
         msg_handler = self.handlers.message_handler
         msg = yield msg_handler.get_message(room_id=urllib.unquote(room_id),
-                                            sender_id=sender_id,
+                                            sender_id=urllib.unquote(sender_id),
                                             msg_id=msg_id,
                                             user_id=user.to_string(),
                                             )
@@ -250,7 +250,7 @@ class MessageRestServlet(RestServlet):
     def on_PUT(self, request, room_id, sender_id, msg_id):
         user = yield self.auth.get_user_by_req(request)
 
-        if user.to_string() != sender_id:
+        if user.to_string() != urllib.unquote(sender_id):
             raise SynapseError(403, "Must send messages as yourself.",
                                errcode=Codes.FORBIDDEN)