aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl/plain.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-12-15 07:12:32 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-12-15 07:12:32 +0500
commit289fd2866ed181d22ea9bd2b2ae9d16022d482d7 (patch)
tree6415d15a3d500762074f9a44e55a06d7da8db9be /util/sasl/plain.lua
parent2d53117389c12d91cec1e47214f8351738b390b9 (diff)
parentafef23ee7e4fb91436f8a07c1cfa6cc876126abb (diff)
downloadprosody-289fd2866ed181d22ea9bd2b2ae9d16022d482d7.tar.gz
prosody-289fd2866ed181d22ea9bd2b2ae9d16022d482d7.zip
Merge 0.9->trunk
Diffstat (limited to 'util/sasl/plain.lua')
-rw-r--r--util/sasl/plain.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/util/sasl/plain.lua b/util/sasl/plain.lua
index ba4645e1..d108a40d 100644
--- a/util/sasl/plain.lua
+++ b/util/sasl/plain.lua
@@ -66,15 +66,11 @@ local function plain(self, message)
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)