diff sat/plugins/plugin_comp_file_sharing.py @ 3301:9d1c0feba048

comp file sharing: file paths are now quoted on upload to allow unicode
author Goffi <goffi@goffi.org>
date Fri, 19 Jun 2020 14:56:45 +0200
parents 91b5ae058c66
children 5887fb414758
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_file_sharing.py	Fri Jun 19 14:55:30 2020 +0200
+++ b/sat/plugins/plugin_comp_file_sharing.py	Fri Jun 19 14:56:45 2020 +0200
@@ -195,7 +195,11 @@
         # 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: