aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJonas Wielicki <jonas@wielicki.name>2018-05-17 17:11:25 +0200
committerJonas Wielicki <jonas@wielicki.name>2018-05-17 17:11:25 +0200
commit3443da43a22c6c9b32023f0a7273f5d3cdeb3f58 (patch)
treeca5418c5d69241630726156916d6e9d0140ab952 /plugins
parentbdc12e4516ba8abe608f27fdc55c8e411093e051 (diff)
downloadprosody-3443da43a22c6c9b32023f0a7273f5d3cdeb3f58.tar.gz
prosody-3443da43a22c6c9b32023f0a7273f5d3cdeb3f58.zip
MUC: reject non-bare JIDs in set_affiliation requests with not-acceptable
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 870bd53c..12ecdbda 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -1076,6 +1076,9 @@ function room_mt:can_set_affiliations(actor, jid_affiliation)
for jid, value in pairs(jid_affiliation) do
local affiliation = value["affiliation"];
+ if jid ~= jid_bare(jid) then
+ return false, "modify", "not-acceptable";
+ end
jid = jid_bare(jid);
if affiliation == "none" then affiliation = nil; end
if affiliation and affiliation ~= "outcast" and affiliation ~= "owner" and affiliation ~= "admin" and affiliation ~= "member" then