# HG changeset patch # User Kim Alvefur # Date 1554845010 -7200 # Node ID deb5ece56c49d69bee5760ad0a09db616905756e # Parent 0ebb7112c102a16849bc12a26872eafd7dc62599 mod_turncredentials: Convert numeric attributes to strings (fixes #1339) diff -r 0ebb7112c102 -r deb5ece56c49 mod_turncredentials/mod_turncredentials.lua --- a/mod_turncredentials/mod_turncredentials.lua Tue Apr 09 18:05:28 2019 +0200 +++ b/mod_turncredentials/mod_turncredentials.lua Tue Apr 09 23:23:30 2019 +0200 @@ -26,8 +26,8 @@ local userpart = tostring(now); local nonce = base64.encode(hmac_sha1(secret, tostring(userpart), false)); origin.send(st.reply(stanza):tag("services", {xmlns = "urn:xmpp:extdisco:1"}) - :tag("service", { type = "stun", host = host, port = port }):up() - :tag("service", { type = "turn", host = host, port = port, username = userpart, password = nonce, ttl = ttl}):up() + :tag("service", { type = "stun", host = host, port = ("%d"):format(port) }):up() + :tag("service", { type = "turn", host = host, port = ("%d"):format(port), username = userpart, password = nonce, ttl = ("%d"):format(ttl) }):up() ); return true; end);