diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-07-27 20:29:32 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-07-27 20:29:32 +0100 |
commit | f926338983c2f1dd0276d41e3c3d8e28cbef3d02 (patch) | |
tree | 545c5eae31e066012bcda98bcae00e7ec8af2640 /plugins/mod_dialback.lua | |
parent | 38d35a1b685a67feaae2299a62562a7ef7e3c324 (diff) | |
download | prosody-f926338983c2f1dd0276d41e3c3d8e28cbef3d02.tar.gz prosody-f926338983c2f1dd0276d41e3c3d8e28cbef3d02.zip |
mod_dialback: Ignore <db:verify/> with a 'type' attribute on incoming connections, instead of interpreting them as a request to verify a key
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r-- | plugins/mod_dialback.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index 73a799e9..69616a57 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -41,6 +41,11 @@ module:hook("stanza/jabber:server:dialback:verify", function(event) -- We are being asked to verify the key, to ensure it was generated by us origin.log("debug", "verifying that dialback key is ours..."); local attr = stanza.attr; + if attr.type then + module:log("warn", "Ignoring incoming session from %s claiming a dialback key for %s is %s", + origin.from_host or "(unknown)", attr.from or "(unknown)", attr.type); + return true; + end -- COMPAT: Grr, ejabberd breaks this one too?? it is black and white in XEP-220 example 34 --if attr.from ~= origin.to_host then error("invalid-from"); end local type; |