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 | 9fbe7c93fad61b64d6131e4c4a04b3d83aca5640 (patch) | |
tree | 06428175b7508c98c32823b95b24ba9d419d2e7d | |
parent | ed924fa0b136ba943f4f8f1f7dfb367bdc5e677d (diff) | |
download | prosody-9fbe7c93fad61b64d6131e4c4a04b3d83aca5640.tar.gz prosody-9fbe7c93fad61b64d6131e4c4a04b3d83aca5640.zip |
util.serialization: Make check of prefix for optional hex encoding stricter
-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 |