# HG changeset patch # User Kim Alvefur # Date 1355546070 -3600 # Node ID f29741c960909a498d32d4a9c1e8704ffe4aed3b # Parent 4516e6bd51b4288f9c369fd1ff04bba0369e5ea3# Parent 775d98184acf8251c7b241084a6cb1f9d61906d9 Merge diff -r 775d98184acf -r f29741c96090 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Fri Dec 14 14:25:58 2012 +0100 +++ b/plugins/muc/muc.lib.lua Sat Dec 15 05:34:30 2012 +0100 @@ -914,8 +914,8 @@ elseif type ~= "error" and type ~= "result" then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); end - elseif stanza.name == "message" and not stanza.attr.type and #stanza.tags == 1 and self._jid_nick[stanza.attr.from] - and stanza.tags[1].name == "x" and stanza.tags[1].attr.xmlns == "http://jabber.org/protocol/muc#user" then + elseif stanza.name == "message" and not(type == "chat" or type == "error" or type == "groupchat" or type == "headline") and #stanza.tags == 1 + and self._jid_nick[stanza.attr.from] and stanza.tags[1].name == "x" and stanza.tags[1].attr.xmlns == "http://jabber.org/protocol/muc#user" then local x = stanza.tags[1]; local payload = (#x.tags == 1 and x.tags[1]); if payload and payload.name == "invite" and payload.attr.to then diff -r 775d98184acf -r f29741c96090 util/sasl/plain.lua --- a/util/sasl/plain.lua Fri Dec 14 14:25:58 2012 +0100 +++ b/util/sasl/plain.lua Sat Dec 15 05:34:30 2012 +0100 @@ -66,15 +66,11 @@ self.username = authentication if state == false then return "failure", "account-disabled"; - elseif state == nil then + elseif state == nil or not correct then return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent."; end - if correct then - return "success"; - else - return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent."; - end + return "success"; end function init(registerMechanism)