aboutsummaryrefslogtreecommitdiffstats
path: root/util/serialization.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-10-11 22:59:26 +0200
committerKim Alvefur <zash@zash.se>2018-10-11 22:59:26 +0200
commit9fbe7c93fad61b64d6131e4c4a04b3d83aca5640 (patch)
tree06428175b7508c98c32823b95b24ba9d419d2e7d /util/serialization.lua
parented924fa0b136ba943f4f8f1f7dfb367bdc5e677d (diff)
downloadprosody-9fbe7c93fad61b64d6131e4c4a04b3d83aca5640.tar.gz
prosody-9fbe7c93fad61b64d6131e4c4a04b3d83aca5640.zip
util.serialization: Make check of prefix for optional hex encoding stricter
Diffstat (limited to 'util/serialization.lua')
-rw-r--r--util/serialization.lua2
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