diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-19 06:47:02 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-19 06:47:02 +0200 |
commit | 84ac4b6752c50fbbfb198a5fd83194839a52989c (patch) | |
tree | d468adaae2c4d5734c76eefc2fb5de501e6c8abe /util/sasl/scram.lua | |
parent | 91a21b8f754027ff4b401a93c6be0c9d89d00183 (diff) | |
download | prosody-84ac4b6752c50fbbfb198a5fd83194839a52989c.tar.gz prosody-84ac4b6752c50fbbfb198a5fd83194839a52989c.zip |
util.sasl.plain,scram: Record username in sasl state earlier
Diffstat (limited to 'util/sasl/scram.lua')
-rw-r--r-- | util/sasl/scram.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua index d2b2abde..4e20dbb9 100644 --- a/util/sasl/scram.lua +++ b/util/sasl/scram.lua @@ -146,6 +146,7 @@ local function scram_gen(hash_name, H_f, HMAC_f) log("debug", "Username violates either SASLprep or contains forbidden character sequences.") return "failure", "malformed-request", "Invalid username."; end + self.username = username; -- retreive credentials local stored_key, server_key, salt, iteration_count; @@ -225,7 +226,6 @@ local function scram_gen(hash_name, H_f, HMAC_f) if StoredKey == H_f(ClientKey) then local server_final_message = "v="..base64.encode(ServerSignature); - self["username"] = state.username; return "success", server_final_message; else return "failure", "not-authorized", "The response provided by the client doesn't match the one we calculated."; |