Skip to content
Snippets Groups Projects
Unverified Commit feee8199 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Fix exceptions on requests for non-ascii urls (#6682)

Fixes #6402
parent da4e5254
No related branches found
No related tags found
No related merge requests found
Fix "CRITICAL" errors being logged when a request is received for a uri containing non-ascii characters.
...@@ -88,7 +88,7 @@ class SynapseRequest(Request): ...@@ -88,7 +88,7 @@ class SynapseRequest(Request):
def get_redacted_uri(self): def get_redacted_uri(self):
uri = self.uri uri = self.uri
if isinstance(uri, bytes): if isinstance(uri, bytes):
uri = self.uri.decode("ascii") uri = self.uri.decode("ascii", errors="replace")
return redact_uri(uri) return redact_uri(uri)
def get_method(self): def get_method(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment