# HG changeset patch # User Kim Alvefur # Date 1625149055 -7200 # Node ID 342664061c9b8a9267a7e67cfa40e978caed0f24 # Parent fcfe691d632261abd415ad3cde4280e615406e35 mod_http_upload: Fix issuing slots to components or other non-c2s sessions The 'full_jid' property only exists on local c2s sessions. This was not adjusted for in 0a56dc6c61af, so it did not work. Thanks Fren__ for highlighting the issue. diff -r fcfe691d6322 -r 342664061c9b mod_http_upload/mod_http_upload.lua --- a/mod_http_upload/mod_http_upload.lua Wed Jun 30 15:53:49 2021 +0200 +++ b/mod_http_upload/mod_http_upload.lua Thu Jul 01 16:17:35 2021 +0200 @@ -195,7 +195,7 @@ :tag("file-too-large", {xmlns=xmlns}) :tag("max-file-size"):text(("%d"):format(file_size_limit)); elseif not check_quota(username, host, filesize) then - module:log("debug", "Upload of %dB by %s would exceed quota", filesize, origin.full_jid); + module:log("debug", "Upload of %dB by %s would exceed quota", filesize, user_bare); return nil, st.error_reply(stanza, "wait", "resource-constraint", "Quota reached"); end @@ -215,7 +215,7 @@ end local slot = random_dir.."/"..filename; - pending_slots[slot] = origin.full_jid; + pending_slots[slot] = user_bare; module:add_timer(900, function() pending_slots[slot] = nil;