Comparison

util/sasl/plain.lua @ 10913:54953b5a214b 0.11

util.sasl.plain: Apply saslprep to stored password Fixes something like #1560 here too. The password sent by the user already had saslprep applied.
author Kim Alvefur <zash@zash.se>
date Fri, 22 May 2020 21:05:45 +0200
parent 8555:4f0f5b49bb03
child 12945:d2c1c327a4d1
comparison
equal deleted inserted replaced
10912:646af16a3f32 10913: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