Software /
code /
prosody
Changeset
5240:864b27ddaa10
util.sasl.plain: Reduce some code.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 15 Dec 2012 07:06:45 +0500 |
parents | 5238:0cc0359d8c39 |
children | 5241:4516e6bd51b4 |
files | util/sasl/plain.lua |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sasl/plain.lua Tue Dec 11 23:40:30 2012 +0100 +++ b/util/sasl/plain.lua Sat Dec 15 07:06:45 2012 +0500 @@ -66,15 +66,11 @@ self.username = authentication if state == false then return "failure", "account-disabled"; - elseif state == nil then + elseif state == nil or not correct then return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent."; end - if correct then - return "success"; - else - return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent."; - end + return "success"; end function init(registerMechanism)