aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-08-03 21:48:51 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-08-03 21:48:51 +0500
commita9648ac8e3d2b4123439a93f8cfe0a671e3e6fe9 (patch)
treebbb8a3a7d754472271e2f55768ee11199e0be426
parentFixed: IQ replies are not sent back on publishing a PEP event (diff)
downloadprosody-a9648ac8e3d2b4123439a93f8cfe0a671e3e6fe9.tar.xz
prosody-a9648ac8e3d2b4123439a93f8cfe0a671e3e6fe9.zip
Fixed: Self-references could be added to rosters via presence subscriptions
-rw-r--r--plugins/mod_presence.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index a077d7bd2..02ec6f794 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -165,6 +165,7 @@ end
function handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza)
local node, host = jid_split(from_bare);
+ if node == origin.username and host == origin.host then return; end -- No self contacts
local st_from, st_to = stanza.attr.from, stanza.attr.to;
stanza.attr.from, stanza.attr.to = from_bare, to_bare;
log("debug", "outbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare);