Diff

util/sasl/scram.lua @ 12024:9184bdda22be

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.
author Matthew Wild <mwild1@gmail.com>
date Tue, 07 Dec 2021 16:23:23 +0000
parent 11174:ddc17e9c66e4
child 12128:593e823566e1
line wrap: on
line diff
--- 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;