aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-08 21:02:14 +0100
committerKim Alvefur <zash@zash.se>2021-12-08 21:02:14 +0100
commitd621e0626cc19c7e9de8956079df3f2abe148251 (patch)
treeb0f870ac01fc84e84e98919787f3df09ba66021c
parent3ae5d13641715b2c7941351a7fc8ff0153db4cef (diff)
downloadprosody-d621e0626cc19c7e9de8956079df3f2abe148251.tar.gz
prosody-d621e0626cc19c7e9de8956079df3f2abe148251.zip
MUC: Remove remaining deprecated numeric error codes
The numeric error codes seems to have been removed from the examples in XEP-0045 version 1.24, and were deprecated even by RFC 3920 in 2004, only allowed for backwards compatibility.
-rw-r--r--plugins/muc/members_only.lib.lua1
-rw-r--r--plugins/muc/muc.lib.lua2
-rw-r--r--plugins/muc/password.lib.lua1
-rw-r--r--spec/scansion/muc_password.scs2
4 files changed, 1 insertions, 5 deletions
diff --git a/plugins/muc/members_only.lib.lua b/plugins/muc/members_only.lib.lua
index 6a2543e1..64587726 100644
--- a/plugins/muc/members_only.lib.lua
+++ b/plugins/muc/members_only.lib.lua
@@ -122,7 +122,6 @@ module:hook("muc-occupant-pre-join", function(event)
local affiliation = room:get_affiliation(stanza.attr.from);
if valid_affiliations[affiliation or "none"] <= valid_affiliations.none then
local reply = st.error_reply(stanza, "auth", "registration-required", nil, room.jid):up();
- reply.tags[1].attr.code = "407";
event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
return true;
end
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index c146255a..5e39d317 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -449,7 +449,6 @@ module:hook("muc-occupant-pre-join", function(event)
local affiliation = room:get_affiliation(stanza.attr.from);
if affiliation == "outcast" then
local reply = st.error_reply(stanza, "auth", "forbidden", nil, room.jid):up();
- reply.tags[1].attr.code = "403";
event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
return true;
end
@@ -692,7 +691,6 @@ function room_mt:handle_normal_presence(origin, stanza)
-- new nick or has different bare real jid
log("debug", "%s couldn't join due to nick conflict: %s", real_jid, dest_occupant.nick);
local reply = st.error_reply(stanza, "cancel", "conflict", nil, self.jid):up();
- reply.tags[1].attr.code = "409";
origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
return true;
end
diff --git a/plugins/muc/password.lib.lua b/plugins/muc/password.lib.lua
index 6695c0cf..b3004eb4 100644
--- a/plugins/muc/password.lib.lua
+++ b/plugins/muc/password.lib.lua
@@ -51,7 +51,6 @@ module:hook("muc-occupant-pre-join", function(event)
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", nil, room.jid):up();
- reply.tags[1].attr.code = "401";
event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
return true;
end
diff --git a/spec/scansion/muc_password.scs b/spec/scansion/muc_password.scs
index 63c821e0..ca7d4cd2 100644
--- a/spec/scansion/muc_password.scs
+++ b/spec/scansion/muc_password.scs
@@ -58,7 +58,7 @@ Juliet sends:
Juliet receives:
<presence from="room@conference.localhost/Juliet" type="error">
- <error type="auth" code="401" by="room@conference.localhost">
+ <error type="auth" by="room@conference.localhost">
<not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</presence>