0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 10:23:57 +01:00

Consistency

This commit is contained in:
Erik Johnston 2015-08-27 10:50:49 +01:00
parent 66ec6cf9b8
commit ddf4d2bd98

View file

@ -155,9 +155,9 @@ class BaseMediaResource(Resource):
# If there isn't check for an ascii name.
if not upload_name:
upload_name = params.get("filename", None)
if upload_name and not is_ascii(upload_name):
upload_name = None
upload_name_ascii = params.get("filename", None)
if upload_name_ascii and is_ascii(upload_name_ascii):
upload_name = upload_name_ascii
if upload_name:
upload_name = urlparse.unquote(upload_name)