aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-03-18 10:32:55 +0000
committerMatthew Wild <mwild1@gmail.com>2011-03-18 10:32:55 +0000
commit6d716b8e257b79ae6c89c4b4fe08e0fc4cebd1d7 (patch)
treed7cf18dfe56652623c31207063fa32c05af78c01
parentd02f7c470017ceb4541b858b60ed0c1bc165f21d (diff)
downloadprosody-6d716b8e257b79ae6c89c4b4fe08e0fc4cebd1d7.tar.gz
prosody-6d716b8e257b79ae6c89c4b4fe08e0fc4cebd1d7.zip
mod_pubsub: Remove checks for whether the JID being (un)subscribed is the actor's own - it's possible to (un)subscribe another JID if you have the (un)subscribe_other capability, which is already checked in util.pubsub (thanks Andrew)
-rw-r--r--plugins/mod_pubsub.lua6
1 files changed, 0 insertions, 6 deletions
diff --git a/plugins/mod_pubsub.lua b/plugins/mod_pubsub.lua
index b8f7a882..465bcb00 100644
--- a/plugins/mod_pubsub.lua
+++ b/plugins/mod_pubsub.lua
@@ -108,9 +108,6 @@ end
function handlers.set_subscribe(origin, stanza, subscribe)
local node, jid = subscribe.attr.node, subscribe.attr.jid;
- if jid_bare(jid) ~= jid_bare(stanza.attr.from) then
- return origin.send(pubsub_error_reply(stanza, "invalid-jid"));
- end
local ok, ret = service:add_subscription(node, stanza.attr.from, jid);
local reply;
if ok then
@@ -129,9 +126,6 @@ end
function handlers.set_unsubscribe(origin, stanza, unsubscribe)
local node, jid = unsubscribe.attr.node, unsubscribe.attr.jid;
- if jid_bare(jid) ~= jid_bare(stanza.attr.from) then
- return origin.send(pubsub_error_reply(stanza, "invalid-jid"));
- end
local ok, ret = service:remove_subscription(node, stanza.attr.from, jid);
local reply;
if ok then