Diff

util/sasl_cyrus.lua @ 3443:1159e007cc8f

util.sasl_cyrus: Make multi-step SASL mechanisms work correctly.
author Waqas Hussain <waqas20@gmail.com>
date Tue, 03 Aug 2010 18:20:29 +0500
parent 3441:d4f89802cf1e
child 3467:c9f4c3aa14a1
line wrap: on
line diff
--- a/util/sasl_cyrus.lua	Tue Aug 03 18:19:45 2010 +0500
+++ b/util/sasl_cyrus.lua	Tue Aug 03 18:20:29 2010 +0500
@@ -133,8 +133,9 @@
 	local err;
 	local data;
 
-	if self.mechanism then
+	if not self.first_step_done then
 		err, data = cyrussasl.server_start(self.cyrus, self.mechanism, message or "")
+		self.first_step_done = true;
 	else
 		err, data = cyrussasl.server_step(self.cyrus, message or "")
 	end