0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 17:53:51 +01:00

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

Fixes #6402
This commit is contained in:
Richard van der Hoff 2020-01-13 12:41:51 +00:00 committed by GitHub
parent da4e52544e
commit feee819973
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

2
changelog.d/6682.bugfix Normal file
View file

@ -0,0 +1,2 @@
Fix "CRITICAL" errors being logged when a request is received for a uri containing non-ascii characters.

View file

@ -88,7 +88,7 @@ class SynapseRequest(Request):
def get_redacted_uri(self):
uri = self.uri
if isinstance(uri, bytes):
uri = self.uri.decode("ascii")
uri = self.uri.decode("ascii", errors="replace")
return redact_uri(uri)
def get_method(self):