Software /
code /
prosody
Comparison
util/sasl/plain.lua @ 3173:bb4286962d69
SASL: Minor cleanup.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 03 Jun 2010 17:48:50 +0500 |
parent | 3164:db9def53fe9c |
child | 3179:99c5288a26e4 |
comparison
equal
deleted
inserted
replaced
3172:6459166ed8f3 | 3173:bb4286962d69 |
---|---|
56 | 56 |
57 local correct, state = false, false; | 57 local correct, state = false, false; |
58 if self.profile.plain then | 58 if self.profile.plain then |
59 local correct_password; | 59 local correct_password; |
60 correct_password, state = self.profile.plain(authentication, self.realm); | 60 correct_password, state = self.profile.plain(authentication, self.realm); |
61 if correct_password == password then correct = true; else correct = false; end | 61 correct = (correct_password == password); |
62 elseif self.profile.plain_test then | 62 elseif self.profile.plain_test then |
63 correct, state = self.profile.plain_test(authentication, password, self.realm); | 63 correct, state = self.profile.plain_test(authentication, password, self.realm); |
64 end | 64 end |
65 | 65 |
66 self.username = authentication | 66 self.username = authentication |