aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-09-04 10:01:57 +0100
committerMatthew Wild <mwild1@gmail.com>2022-09-04 10:01:57 +0100
commitfd637bf6bede43756abd33ec84593b3091d1283d (patch)
tree81d5fda248e0757c42be39819bef1851dd6dea94 /plugins
parentaf0f1947cf22896d962b93ab93a83747414558d4 (diff)
downloadprosody-fd637bf6bede43756abd33ec84593b3091d1283d.tar.gz
prosody-fd637bf6bede43756abd33ec84593b3091d1283d.zip
mod_http_file_share: Use correct variable name (thanks riau.sni)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index 7c615757..c45e7732 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -264,11 +264,11 @@ function handle_upload(event, path) -- PUT /upload/:slot
module:log("debug", "Unauthorized or invalid token: %s, %q", authz, authed_upload_info);
return 401;
end
- if not path or upload_info.slot ~= path:match("^[^/]+") then
- module:log("debug", "Invalid upload slot: %q, path: %q", upload_info.slot, path);
+ if not path or authed_upload_info.slot ~= path:match("^[^/]+") then
+ module:log("debug", "Invalid upload slot: %q, path: %q", authed_upload_info.slot, path);
return 400;
end
- if request.headers.content_length and tonumber(request.headers.content_length) ~= upload_info.filesize then
+ if request.headers.content_length and tonumber(request.headers.content_length) ~= authed_upload_info.filesize then
return 413;
-- Note: We don't know the size if the upload is streamed in chunked encoding,
-- so we also check the final file size on completion.