Software /
code /
prosody
Comparison
util/sasl/plain.lua @ 3155:c713fa2ba80c
SASL: Minor cleanup.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 03 Jun 2010 17:48:50 +0500 |
parent | 3080:8e842989ced2 |
child | 3179:99c5288a26e4 |
comparison
equal
deleted
inserted
replaced
3154:104f05235cef | 3155:c713fa2ba80c |
---|---|
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, self.realm, password); | 63 correct, state = self.profile.plain_test(authentication, self.realm, password); |
64 end | 64 end |
65 | 65 |
66 self.username = authentication | 66 self.username = authentication |