From 1b4c02e5ca23781bef89be5e8497c0f225ff3036 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Mon, 22 Aug 2016 16:59:40 +0200 Subject: exit module after sending error reply in case storage backend returned error code 403 --- prosody-module/mod_http_upload_external/mod_http_upload_external.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua index ab7c0e0..64d5e3c 100644 --- a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua +++ b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua @@ -107,6 +107,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event) end elseif statuscode == 403 and errobj["msg"] ~= nil then origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg)); + return true; else origin.send(st.error_reply(stanza, "cancel", "undefined-condition", "msg or err_code not found")); return true; @@ -172,6 +173,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event) end elseif statuscode == 403 and errobj["msg"] ~= nil then origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg)); + return true; else origin.send(st.error_reply(stanza, "cancel", "undefined-condition", "msg or err_code not found")); return true; -- cgit v1.2.3