Software /
code /
prosody
Changeset
10447:b5fd1637f15c
MUC: Indicate origin of password related errors
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 25 Nov 2019 23:47:49 +0100 |
parents | 10446:5c2d1b13537c |
children | 10448:cbe524ed1a6a |
files | plugins/muc/password.lib.lua spec/scansion/muc_password.scs |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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: <presence from="room@conference.localhost/Juliet" type="error"> - <error type="auth" code="401"> + <error type="auth" code="401" by="room@conference.localhost"> <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> </error> </presence>