diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-06-07 01:29:34 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-06-07 01:29:34 +0100 |
commit | 7d8433ac020c30ba9d3a73956ecabf6822e97d76 (patch) | |
tree | b14478387b7fa4ac1cf1e954ca9515f983df0291 /plugins/mod_dialback.lua | |
parent | cc5269517df6d8643437875bb49baec4bd3e6f87 (diff) | |
parent | 7c6db5e1b2d8579501981b1010574f0363330d28 (diff) | |
download | prosody-7d8433ac020c30ba9d3a73956ecabf6822e97d76.tar.gz prosody-7d8433ac020c30ba9d3a73956ecabf6822e97d76.zip |
Merge 0.8->trunk
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r-- | plugins/mod_dialback.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index 91291e24..e27f8657 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -60,7 +60,7 @@ module:hook("stanza/jabber:server:dialback:result", function(event) return true; end - dialback_requests[attr.from] = origin; + dialback_requests[attr.from.."/"..origin.streamid] = origin; if not origin.from_host then -- Just used for friendlier logging @@ -83,8 +83,8 @@ module:hook("stanza/jabber:server:dialback:verify", function(event) if origin.type == "s2sout_unauthed" or origin.type == "s2sout" then local attr = stanza.attr; - local dialback_verifying = dialback_requests[attr.from]; - if dialback_verifying then + local dialback_verifying = dialback_requests[attr.from.."/"..(attr.id or "")]; + if dialback_verifying and attr.from == origin.to_host then local valid; if attr.type == "valid" then s2s_make_authenticated(dialback_verifying, attr.from); @@ -101,7 +101,7 @@ module:hook("stanza/jabber:server:dialback:verify", function(event) st.stanza("db:result", { from = attr.to, to = attr.from, id = attr.id, type = valid }) :text(dialback_verifying.hosts[attr.from].dialback_key)); end - dialback_requests[attr.from] = nil; + dialback_requests[attr.from.."/"..(attr.id or "")] = nil; end return true; end |