aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2021-12-07 16:23:23 +0000
committerMatthew Wild <mwild1@gmail.com>2021-12-07 16:23:23 +0000
commitaa0b6f765aef1ff89e763fecb46d014d82f67ec3 (patch)
tree1e3f0b6b6e7a369bb81cb8b24cec566fa855ce9b
parent1ffb6f0b3dd61ea852ceb715d939077eda919d4e (diff)
downloadprosody-aa0b6f765aef1ff89e763fecb46d014d82f67ec3.tar.gz
prosody-aa0b6f765aef1ff89e763fecb46d014d82f67ec3.zip
util.sasl.scram: Store username property rather than cached local (#399)
This should allow modules to override the username in a profile handler by assigning to self.username.
-rw-r--r--util/sasl/scram.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua
index 865f8cf7..f11ae2e0 100644
--- a/util/sasl/scram.lua
+++ b/util/sasl/scram.lua
@@ -175,7 +175,7 @@ local function scram_gen(hash_name, H_f, HMAC_f, get_auth_db, expect_cb)
self.state = {
gs2_header = gs2_header;
gs2_cbind_name = gs2_cbind_name;
- username = username;
+ username = self.username; -- Reference property instead of local, in case it was modified by the profile
nonce = nonce;
server_key = server_key;