summary refs log tree commit diff
path: root/synapse/rest/media/v1/base_resource.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-08-26 17:27:23 +0100
committerMark Haines <mark.haines@matrix.org>2015-08-26 17:27:23 +0100
commitc9cb354b58972b9e0e91cd6d6398e9bb02f7b967 (patch)
tree96518f02f3b845794c270da3c026d0d157dd52e2 /synapse/rest/media/v1/base_resource.py
parentHandle unicode filenames given when downloading or received over federation (diff)
downloadsynapse-c9cb354b58972b9e0e91cd6d6398e9bb02f7b967.tar.xz
Give a sensible error message if the filename is invalid UTF-8
Diffstat (limited to 'synapse/rest/media/v1/base_resource.py')
-rw-r--r--synapse/rest/media/v1/base_resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/base_resource.py b/synapse/rest/media/v1/base_resource.py
index ad2c9d4e74..60751da1d1 100644
--- a/synapse/rest/media/v1/base_resource.py
+++ b/synapse/rest/media/v1/base_resource.py
@@ -155,7 +155,7 @@ class BaseMediaResource(Resource):
                 if upload_name:
                     upload_name = urlparse.unquote(upload_name)
                     try:
-                        upload_name = upload_name.decode("utf-8");
+                        upload_name = upload_name.decode("utf-8")
                     except UnicodeDecodeError:
                         upload_name = None
             else: