aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-28 17:24:37 +0100
committerKim Alvefur <zash@zash.se>2021-01-28 17:24:37 +0100
commit0289a561e65eb736cab238cc6d5b20be7aad3482 (patch)
tree28d4cd7407c542f5b20a0898d57fa2dc363e9fda /plugins
parentfab6ebb1e6b61e0692267f6f88ecba190be58f86 (diff)
downloadprosody-0289a561e65eb736cab238cc6d5b20be7aad3482.tar.gz
prosody-0289a561e65eb736cab238cc6d5b20be7aad3482.zip
mod_http_file_share: Allow started uploads to complete after token expired
Otherwise uploads taking longer than 5 minutes would be rejected on completion, and that's probably annoying. Thanks jonas’
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index e06ff82b..e9c00399 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -169,7 +169,7 @@ function handle_upload(event, path) -- PUT /upload/:slot
module:log("debug", "Unauthorized or invalid token: %s, %q", authed, upload_info);
return 401;
end
- if upload_info.exp < os.time() then
+ if not request.body_sink and upload_info.exp < os.time() then
module:log("debug", "Authorization token expired on %s", dt.datetime(upload_info.exp));
return 410;
end