diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-13 16:34:55 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-13 16:34:55 +0100 |
commit | 58c91153514c6e07ba3bed20473a92d87ddd3ca5 (patch) | |
tree | 87f8f4755afc8ba49eeabeca279898ab9260e632 /util/format.lua | |
parent | 283042d7c3ae7e7b25a51e71be736c84a71a0bd7 (diff) | |
download | prosody-58c91153514c6e07ba3bed20473a92d87ddd3ca5.tar.gz prosody-58c91153514c6e07ba3bed20473a92d87ddd3ca5.zip |
util.format: Ensure metatable __tostring results are also sanitized
Diffstat (limited to 'util/format.lua')
-rw-r--r-- | util/format.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/format.lua b/util/format.lua index efd92e3d..e93c9096 100644 --- a/util/format.lua +++ b/util/format.lua @@ -70,7 +70,8 @@ local function format(formatstring, ...) -- No UTF-8 or control characters, assumed to be the common case. return elseif option == "s" and t ~= "string" then - args[i] = tostring(arg); + arg = tostring(arg); + t = "string"; end if option ~= "s" and option ~= "q" and option ~= "p" then |