Fix quoting in util/sasl.lua

Tue, 30 Sep 2008 21:35:39 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 30 Sep 2008 21:35:39 +0100
changeset 32
a4de5ab077ab
parent 31
aaccbf07849b
child 33
091f91a1f67a

Fix quoting in util/sasl.lua

util/sasl.lua file | annotate | diff | comparison | revisions
--- a/util/sasl.lua	Tue Sep 30 21:20:55 2008 +0100
+++ b/util/sasl.lua	Tue Sep 30 21:35:39 2008 +0100
@@ -10,9 +10,9 @@
 						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 = 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]+)]])
+						local authorization = string.match(response, "([^&\0]+)")
+						local authentication = string.match(response, "\0([^&\0]+)\0")
+						local password = string.match(response, "\0[^&\0]+\0([^&\0]+)")
 						if self.onAuth(authorization, password) == true then
 							self.onWrite(stanza.stanza("success", {xmlns = "urn:ietf:params:xml:ns:xmpp-sasl"}))
 							self.onSuccess()

mercurial