diff options
author | Kim Alvefur <zash@zash.se> | 2018-10-11 22:59:26 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-10-11 22:59:26 +0200 |
commit | cd8f883199e5f140d1152f0c8da8aad347eadf4f (patch) | |
tree | 06428175b7508c98c32823b95b24ba9d419d2e7d /util | |
parent | ba2074f29446a6e45e3a2f7f1871e736404c5f12 (diff) | |
download | prosody-cd8f883199e5f140d1152f0c8da8aad347eadf4f.tar.gz prosody-cd8f883199e5f140d1152f0c8da8aad347eadf4f.zip |
util.serialization: Make check of prefix for optional hex encoding stricter
Diffstat (limited to 'util')
-rw-r--r-- | util/serialization.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/serialization.lua b/util/serialization.lua index 628c9d33..cc230238 100644 --- a/util/serialization.lua +++ b/util/serialization.lua @@ -217,7 +217,7 @@ local function new(opt) return '"' .. s_gsub(s, "[%z\1-\31\"\'\\\127-\255]", string_escapes) .. '"'; end - if hex then + if type(hex) == "string" then function types.string(s) local esc = serialize_string(s); if #esc > (#s*2+2+#hex) then |