Diff

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
line wrap: on
line diff
--- a/util/sasl/scram.lua	Sat Oct 05 18:10:12 2019 +0200
+++ b/util/sasl/scram.lua	Sun Oct 06 16:07:26 2019 +0200
@@ -190,7 +190,7 @@
 			end
 
 			local nonce = clientnonce .. generate_uuid();
-			local server_first_message = "r="..nonce..",s="..base64.encode(salt)..",i="..iteration_count;
+			local server_first_message = ("r=%s,s=%s,i=%d"):format(nonce, base64.encode(salt), iteration_count);
 			self.state = {
 				gs2_header = gs2_header;
 				gs2_cbind_name = gs2_cbind_name;