comp file sharing: file paths are now quoted on upload to allow unicode

This commit is contained in:
Goffi 2020-06-19 14:56:45 +02:00
commit 86aaf35b60

View file

@ -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: