aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl/plain.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-19 06:47:02 +0200
committerKim Alvefur <zash@zash.se>2017-04-19 06:47:02 +0200
commit84ac4b6752c50fbbfb198a5fd83194839a52989c (patch)
treed468adaae2c4d5734c76eefc2fb5de501e6c8abe /util/sasl/plain.lua
parent91a21b8f754027ff4b401a93c6be0c9d89d00183 (diff)
downloadprosody-84ac4b6752c50fbbfb198a5fd83194839a52989c.tar.gz
prosody-84ac4b6752c50fbbfb198a5fd83194839a52989c.zip
util.sasl.plain,scram: Record username in sasl state earlier
Diffstat (limited to 'util/sasl/plain.lua')
-rw-r--r--util/sasl/plain.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/sasl/plain.lua b/util/sasl/plain.lua
index 26e65335..cd59b1ac 100644
--- a/util/sasl/plain.lua
+++ b/util/sasl/plain.lua
@@ -63,6 +63,8 @@ local function plain(self, message)
end
end
+ self.username = authentication
+
local correct, state = false, false;
if self.profile.plain then
local correct_password;
@@ -72,7 +74,6 @@ local function plain(self, message)
correct, state = self.profile.plain_test(self, authentication, password, self.realm);
end
- self.username = authentication
if state == false then
return "failure", "account-disabled";
elseif state == nil or not correct then