From 456ca909e253ce26bf435619a91a3e1fa40f87dd Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 26 Jan 2021 14:53:43 +0100 Subject: mod_http_file_share: Add file type filter Unlike mod_http_upload, this can't be bypassed by uploading with a different file extension. --- spec/scansion/http_upload.scs | 13 +++++++++++++ spec/scansion/prosody.cfg.lua | 1 + 2 files changed, 14 insertions(+) (limited to 'spec/scansion') diff --git a/spec/scansion/http_upload.scs b/spec/scansion/http_upload.scs index 72552946..ab87ddee 100644 --- a/spec/scansion/http_upload.scs +++ b/spec/scansion/http_upload.scs @@ -50,6 +50,19 @@ Romeo receives: +Romeo sends: + + + + +Romeo receives: + + + + File type not allowed + + + Romeo disconnects # recording ended on 2021-01-27T22:10:46Z diff --git a/spec/scansion/prosody.cfg.lua b/spec/scansion/prosody.cfg.lua index d0964c05..3ed97e31 100644 --- a/spec/scansion/prosody.cfg.lua +++ b/spec/scansion/prosody.cfg.lua @@ -134,3 +134,4 @@ Component "pubsub.localhost" "pubsub" Component "upload.localhost" "http_file_share" http_file_share_size_limit = 10000000 +http_file_share_allowed_file_types = { "text/plain", "image/*" } -- cgit v1.2.3