aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-31 20:38:40 +0100
committerKim Alvefur <zash@zash.se>2021-01-31 20:38:40 +0100
commit2c54183cfc1599a11af1a20bd8051bd042fa13f9 (patch)
treed1d0b0247840aa5d3eb973db335cd739a313e3d5 /plugins
parenta609c0902bccfc6a222c9eed2581a8c683ee4b99 (diff)
downloadprosody-2c54183cfc1599a11af1a20bd8051bd042fa13f9.tar.gz
prosody-2c54183cfc1599a11af1a20bd8051bd042fa13f9.zip
mod_http_file_share: Reorder arguments
'filetype' is optional, so having it last seems sensible. 'slot' is pretty important, so moving it earlier seems sensible.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index 45fa9051..99226508 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -121,7 +121,7 @@ function may_upload(uploader, filename, filesize, filetype) -- > boolean, error
return true;
end
-function get_authz(uploader, filename, filesize, filetype, slot)
+function get_authz(slot, uploader, filename, filesize, filetype)
return jwt.sign(secret, {
sub = uploader;
filename = filename;
@@ -175,7 +175,7 @@ function handle_slot_request(event)
quota_cache:set(uploader, cached_quota);
end
- local authz = get_authz(uploader, filename, filesize, filetype, slot);
+ local authz = get_authz(slot, uploader, filename, filesize, filetype);
local slot_url = get_url(slot, filename);
local upload_url = slot_url;