Software /
code /
prosody
Changeset
12722:cd993fd7b60d
mod_http_file_share: Use correct variable name (thanks riau.sni)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 04 Sep 2022 10:01:57 +0100 |
parents | 12721:7830db3c38c3 |
children | 12723:4cfd09343947 |
files | plugins/mod_http_file_share.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua Sat Sep 03 21:25:51 2022 +0100 +++ b/plugins/mod_http_file_share.lua Sun Sep 04 10:01:57 2022 +0100 @@ -264,11 +264,11 @@ 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.