aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2025-03-23 12:36:47 +0100
committerKim Alvefur <zash@zash.se>2025-03-23 12:36:47 +0100
commitfaed304d55dfc2bb26730b78e3d54fea23573b5c (patch)
treebea90a0243036fd22c658261ddd01aa0b6e24757 /plugins
parentafd99708d60d640282966a5857f1483333339c77 (diff)
downloadprosody-faed304d55dfc2bb26730b78e3d54fea23573b5c.tar.gz
prosody-faed304d55dfc2bb26730b78e3d54fea23573b5c.zip
mod_http_file_share: Explicitly reject all unsupported ranges
Fail fast. Otherwise it sends the whole file.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index ab9940b9..7b9aff75 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -442,6 +442,9 @@ function handle_download(event, path) -- GET /uploads/:slot+filename
handle:close();
return 416;
end
+ else
+ handle:close();
+ return 416;
end
end