From 841f5a5a5beeecc4579bc91ac796cb44fdc7b47f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 11 Mar 2018 19:40:15 +0100 Subject: xep_0363: Only send the basename() of the filename to the server. --- slixmpp/plugins/xep_0363/http_upload.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slixmpp/plugins/xep_0363/http_upload.py b/slixmpp/plugins/xep_0363/http_upload.py index 0fc91f4e..0cca2d08 100644 --- a/slixmpp/plugins/xep_0363/http_upload.py +++ b/slixmpp/plugins/xep_0363/http_upload.py @@ -8,6 +8,7 @@ import asyncio import logging +import os.path from aiohttp import ClientSession from mimetypes import guess_type @@ -128,7 +129,8 @@ class XEP_0363(BasePlugin): if content_type is None: content_type = self.default_content_type - slot_iq = await self.request_slot(self.upload_service, filename, size, + basename = os.path.basename(filename) + slot_iq = await self.request_slot(self.upload_service, basename, size, content_type, ifrom, timeout) slot = slot_iq['http_upload_slot'] -- cgit v1.2.3