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 2270
9368ab10c1a8
parent 2269
770a75623ed7
child 2271
a6d69f00a509
child 2288
ef7027a0f0c9
child 2313
d76e8d7b7f5d

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

util/sasl/plain.lua file | annotate | diff | comparison | revisions
--- a/util/sasl/plain.lua	Tue Dec 01 02:23:48 2009 +0500
+++ b/util/sasl/plain.lua	Tue Dec 01 22:32:37 2009 +0500
@@ -24,7 +24,7 @@
 		return "failure", "malformed-request";
 	end
 
-	local authorization, authentication, password = s_match(message, "^([^%z]+)%z([^%z]+)%z([^%z]+)");
+	local authorization, authentication, password = s_match(message, "^([^%z]*)%z([^%z]+)%z([^%z]+)");
 
 	if not authorization then
 		return "failure", "malformed-request";

mercurial