From 6950c42925396e5edfffe4746522bbf35de36282 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Mon, 22 Aug 2016 16:03:10 +0200 Subject: Fixed string comparison from not equals to equals for slot_type check and added additional debug log message --- prosody-module/mod_http_upload_external/mod_http_upload_external.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 335a9d1..cb59af4 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 @@ -43,7 +43,8 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event) return true; end local slot_type = request.attr.type; - if not slot_type or slot_type ~= "upload" then + module:log("debug", "incoming request is of type " .. slot_type); + if not slot_type or slot_type == "upload" then -- validate local filename = request:get_child_text("filename"); if not filename then @@ -134,7 +135,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event) reply:tag("get"):text(get_url):up(); reply:tag("put"):text(put_url):up(); origin.send(reply); - elseif slot_type ~= "delete" then + elseif slot_type == "delete" then -- validate local fileurl = request:get_child_text("fileurl"); if not fileurl then -- cgit v1.2.3