util.sasl.scram: Avoid implicit coersion of number to string
authorKim Alvefur <zash@zash.se>
Sun, 06 Oct 2019 16:07:26 +0200
changeset 10310 c0a94419c28e
parent 10309 2fadbf209678
child 10311 6a997f0ceba8
util.sasl.scram: Avoid implicit coersion of number to string Lua can be compiled without coercion, which would cause an error here.
util/sasl/scram.lua
--- 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;