diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-31 20:38:40 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-31 20:38:40 +0100 |
commit | 5d9802727bef83c44a7d66133bedaf3ee77a155d (patch) | |
tree | d1d0b0247840aa5d3eb973db335cd739a313e3d5 /plugins | |
parent | f5baa837148e952415e4e0bbf948d69a558cc730 (diff) | |
download | prosody-5d9802727bef83c44a7d66133bedaf3ee77a155d.tar.gz prosody-5d9802727bef83c44a7d66133bedaf3ee77a155d.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.lua | 4 |
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; |