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.
--- a/util/sasl/scram.lua Tue Dec 07 13:21:20 2021 +0100
+++ b/util/sasl/scram.lua Tue Dec 07 16:23:23 2021 +0000
@@ -175,7 +175,7 @@
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;