From 86aaf35b602ed717e3c9308913458f47887fc908 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 19 Jun 2020 14:56:45 +0200 Subject: [PATCH] comp file sharing: file paths are now quoted on upload to allow unicode --- sat/plugins/plugin_comp_file_sharing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sat/plugins/plugin_comp_file_sharing.py b/sat/plugins/plugin_comp_file_sharing.py index 66c8f4dc..46993361 100644 --- a/sat/plugins/plugin_comp_file_sharing.py +++ b/sat/plugins/plugin_comp_file_sharing.py @@ -195,7 +195,11 @@ class HTTPFileServer(resource.Resource): # the 2 following headers are not standard, but useful in the context of file # sharing with HTTP Upload: first one allow uploaded to specify the path # and second one will disable public exposure of the file through HTTP - path = request.getHeader("Xmpp-File-Path") or "/uploads" + path = request.getHeader("Xmpp-File-Path") + if path: + path = unquote(path) + else: + path = "/uploads" if request.getHeader("Xmpp-File-No-Http") is not None: public_id = None else: