util/sasl/plain.lua
branch0.11
changeset 10917 54953b5a214b
parent 8558 4f0f5b49bb03
child 12949 d2c1c327a4d1
equal deleted inserted replaced
10916:646af16a3f32 10917:54953b5a214b
    68 
    68 
    69 	local correct, state = false, false;
    69 	local correct, state = false, false;
    70 	if self.profile.plain then
    70 	if self.profile.plain then
    71 		local correct_password;
    71 		local correct_password;
    72 		correct_password, state = self.profile.plain(self, authentication, self.realm);
    72 		correct_password, state = self.profile.plain(self, authentication, self.realm);
    73 		correct = (correct_password == password);
    73 		correct = (saslprep(correct_password) == password);
    74 	elseif self.profile.plain_test then
    74 	elseif self.profile.plain_test then
    75 		correct, state = self.profile.plain_test(self, authentication, password, self.realm);
    75 		correct, state = self.profile.plain_test(self, authentication, password, self.realm);
    76 	end
    76 	end
    77 
    77 
    78 	if state == false then
    78 	if state == false then