# HG changeset patch # User Jonas Wielicki # Date 1526569885 -7200 # Node ID 564e897f079089c25f659f3acdfaccb48a332120 # Parent a7221ada936816f89218cd727a4015595f1fbdb1 MUC: reject non-bare JIDs in set_affiliation requests with not-acceptable diff -r a7221ada9368 -r 564e897f0790 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Thu May 17 17:11:00 2018 +0200 +++ b/plugins/muc/muc.lib.lua Thu May 17 17:11:25 2018 +0200 @@ -1076,6 +1076,9 @@ 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