util.sasl.plain: Allow empty authzid (thanks bjc).

Tue, 01 Dec 2009 22:32:37 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Tue, 01 Dec 2009 22:32:37 +0500
changeset 2873
108ed17f1dd9
parent 2872
cdc292d201fc
child 2874
54c8b3952786

util.sasl.plain: Allow empty authzid (thanks bjc).

util/sasl.lua file | annotate | diff | comparison | revisions
--- a/util/sasl.lua	Fri Feb 12 21:33:22 2010 +0000
+++ b/util/sasl.lua	Tue Dec 01 22:32:37 2009 +0500
@@ -38,7 +38,7 @@
 	function object.feed(self, message)
 		if message == "" or message == nil then return "failure", "malformed-request" end
 		local response = message
-		local authorization = s_match(response, "([^%z]+)")
+		local authorization = s_match(response, "([^%z]*)")
 		local authentication = s_match(response, "%z([^%z]+)%z")
 		local password = s_match(response, "%z[^%z]+%z([^%z]+)")
 

mercurial