util.sasl_cyrus: Make multi-step SASL mechanisms work correctly.
authorWaqas Hussain <waqas20@gmail.com>
Tue, 3 Aug 2010 13:20:29 +0000 (18:20 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Tue, 3 Aug 2010 13:20:29 +0000 (18:20 +0500)
util/sasl_cyrus.lua

index ef1bf3d0d738ce9dae146fa29b305bc04f8fff76..2e5b96c0e0fca84262de9fc620179c6ac2858158 100644 (file)
@@ -133,8 +133,9 @@ function method:process(message)
        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