# HG changeset patch # User Kim Alvefur # Date 1574722069 -3600 # Node ID b5fd1637f15cd49f04a8d8aadbc47f3d86ceb6ec # Parent 5c2d1b13537c5d6e696a64a7d8255059c3744d37 MUC: Indicate origin of password related errors diff -r 5c2d1b13537c -r b5fd1637f15c plugins/muc/password.lib.lua --- a/plugins/muc/password.lib.lua Mon Nov 25 20:59:36 2019 +0100 +++ b/plugins/muc/password.lib.lua Mon Nov 25 23:47:49 2019 +0100 @@ -50,7 +50,7 @@ if get_password(room) ~= password then local from, to = stanza.attr.from, stanza.attr.to; module:log("debug", "%s couldn't join due to invalid password: %s", from, to); - local reply = st.error_reply(stanza, "auth", "not-authorized"):up(); + local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up(); reply.tags[1].attr.code = "401"; event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); return true; diff -r 5c2d1b13537c -r b5fd1637f15c spec/scansion/muc_password.scs --- a/spec/scansion/muc_password.scs Mon Nov 25 20:59:36 2019 +0100 +++ b/spec/scansion/muc_password.scs Mon Nov 25 23:47:49 2019 +0100 @@ -58,7 +58,7 @@ Juliet receives: - +