mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:14:58 -04:00
Give a sensible error message if the filename is invalid UTF-8
This commit is contained in:
parent
5a9e0c3682
commit
c9cb354b58
2 changed files with 8 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue