util/sasl.lua
changeset 16 ba8e796f9f94
parent 15 c0d754774db2
child 17 9a2685f39f9f
--- a/util/sasl.lua	Tue Aug 26 00:57:46 2008 +0200
+++ b/util/sasl.lua	Tue Aug 26 01:01:13 2008 +0200
@@ -8,7 +8,7 @@
 	object.feed = 	function(self, stanza)
 						if (stanza.name ~= "response") then self.onFail() end
 						if (stanza.attr.xmlns ~= "urn:ietf:params:xml:ns:xmpp-sasl") then self.onFail() end
-						local response = stanza.tag[1]
+						local response = base64.decode(stanza.tag[1])
 						local authorization = string.match(response, [[([^&\0]+)]])
 						local authentication = string.match(response, [[\0([^&\0]+)\0]])
 						local password = string.match(response, [[\0[^&\0]+\0([^&\0]+)]])