summary refs log tree commit diff
path: root/synapse/http/site.py
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-05-02 20:22:41 +0200
committerkaiyou <pierre@jaury.eu>2018-05-02 20:22:41 +0200
commit9a779c2ddb88f875d3ceec4ff02bdb922a0c57c6 (patch)
tree1034b986ea37a081707b489cb3ebe6e4d584defe /synapse/http/site.py
parentMake the logging level configurable (diff)
parentmissing word :| (diff)
downloadsynapse-9a779c2ddb88f875d3ceec4ff02bdb922a0c57c6.tar.xz
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
Diffstat (limited to 'synapse/http/site.py')
-rw-r--r--synapse/http/site.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py
index e422c8dfae..c8b46e1af2 100644
--- a/synapse/http/site.py
+++ b/synapse/http/site.py
@@ -20,7 +20,7 @@ import logging
 import re
 import time
 
-ACCESS_TOKEN_RE = re.compile(r'(\?.*access(_|%5[Ff])token=)[^&]*(.*)$')
+ACCESS_TOKEN_RE = re.compile(br'(\?.*access(_|%5[Ff])token=)[^&]*(.*)$')
 
 
 class SynapseRequest(Request):
@@ -43,12 +43,12 @@ class SynapseRequest(Request):
 
     def get_redacted_uri(self):
         return ACCESS_TOKEN_RE.sub(
-            r'\1<redacted>\3',
+            br'\1<redacted>\3',
             self.uri
         )
 
     def get_user_agent(self):
-        return self.requestHeaders.getRawHeaders("User-Agent", [None])[-1]
+        return self.requestHeaders.getRawHeaders(b"User-Agent", [None])[-1]
 
     def started_processing(self):
         self.site.access_logger.info(