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’
--- a/plugins/mod_http_file_share.lua Thu Jan 28 17:13:49 2021 +0100
+++ b/plugins/mod_http_file_share.lua Thu Jan 28 17:24:37 2021 +0100
@@ -169,7 +169,7 @@
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