aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-01 15:48:39 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-01 15:48:39 +0500
commit2c16a1aec191b70099d6c32267387bc18924e4b6 (patch)
treeb800c9615b826bf7046f75fcbd8ffa4e51383344
parentb78acdcf965f7c4cc92daf93aca2a6c38e6e9341 (diff)
downloadprosody-2c16a1aec191b70099d6c32267387bc18924e4b6.tar.gz
prosody-2c16a1aec191b70099d6c32267387bc18924e4b6.zip
stanza_router: Don't reply with an error on invalid JIDs in error or result stanzas
-rw-r--r--core/stanza_router.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 001a9fd2..03221fb9 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -81,7 +81,9 @@ function core_process_stanza(origin, stanza)
node, host, resource = jid_prepped_split(to);
if not host then
log("warn", "Received stanza with invalid destination JID: %s", to);
- origin.send(st.error_reply(stanza, "modify", "jid-malformed", "The destination address is invalid: "..to));
+ if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then
+ origin.send(st.error_reply(stanza, "modify", "jid-malformed", "The destination address is invalid: "..to));
+ end
return;
end
to_bare = node and (node.."@"..host) or host; -- bare JID
@@ -93,7 +95,9 @@ function core_process_stanza(origin, stanza)
from_node, from_host, from_resource = jid_prepped_split(from);
if not from_host then
log("warn", "Received stanza with invalid source JID: %s", from);
- origin.send(st.error_reply(stanza, "modify", "jid-malformed", "The source address is invalid: "..from));
+ if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then
+ origin.send(st.error_reply(stanza, "modify", "jid-malformed", "The source address is invalid: "..from));
+ end
return;
end
from_bare = from_node and (from_node.."@"..from_host) or from_host; -- bare JID