Software /
code /
prosody
Comparison
util/sasl/scram.lua @ 10306:c0a94419c28e
util.sasl.scram: Avoid implicit coersion of number to string
Lua can be compiled without coercion, which would cause an error here.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 06 Oct 2019 16:07:26 +0200 |
parent | 10295:9b662488d726 |
child | 10499:79c568d4146c |
comparison
equal
deleted
inserted
replaced
10305:2fadbf209678 | 10306:c0a94419c28e |
---|---|
188 if status == nil then return "failure", "not-authorized" | 188 if status == nil then return "failure", "not-authorized" |
189 elseif status == false then return "failure", "account-disabled" end | 189 elseif status == false then return "failure", "account-disabled" end |
190 end | 190 end |
191 | 191 |
192 local nonce = clientnonce .. generate_uuid(); | 192 local nonce = clientnonce .. generate_uuid(); |
193 local server_first_message = "r="..nonce..",s="..base64.encode(salt)..",i="..iteration_count; | 193 local server_first_message = ("r=%s,s=%s,i=%d"):format(nonce, base64.encode(salt), iteration_count); |
194 self.state = { | 194 self.state = { |
195 gs2_header = gs2_header; | 195 gs2_header = gs2_header; |
196 gs2_cbind_name = gs2_cbind_name; | 196 gs2_cbind_name = gs2_cbind_name; |
197 username = username; | 197 username = username; |
198 nonce = nonce; | 198 nonce = nonce; |