Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
12023:5a3781a12285 | 12024:9184bdda22be |
---|---|
173 local nonce = clientnonce .. generate_uuid(); | 173 local nonce = clientnonce .. generate_uuid(); |
174 local server_first_message = ("r=%s,s=%s,i=%d"):format(nonce, base64.encode(salt), iteration_count); | 174 local server_first_message = ("r=%s,s=%s,i=%d"):format(nonce, base64.encode(salt), iteration_count); |
175 self.state = { | 175 self.state = { |
176 gs2_header = gs2_header; | 176 gs2_header = gs2_header; |
177 gs2_cbind_name = gs2_cbind_name; | 177 gs2_cbind_name = gs2_cbind_name; |
178 username = username; | 178 username = self.username; -- Reference property instead of local, in case it was modified by the profile |
179 nonce = nonce; | 179 nonce = nonce; |
180 | 180 |
181 server_key = server_key; | 181 server_key = server_key; |
182 stored_key = stored_key; | 182 stored_key = stored_key; |
183 client_first_message_bare = client_first_message_bare; | 183 client_first_message_bare = client_first_message_bare; |