From: Tarmo Oja Date: Fri, 23 Aug 2024 12:00:27 +0000 (+0300) Subject: handle nil X-Git-Tag: 3.10.0~26^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b37440609e71c21b7b3f225dcaf021b53c7d078c;p=rspamd.git handle nil --- diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index 8f44e25f2..88599407c 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -1696,6 +1696,9 @@ exports.join_path = join_path -- ---]]] local function url_encode_string(str) + if str == nil then + return '' + end str = string.gsub(str, "([^%w _%%%-%.~])", function(c) return string.format("%%%02X", string.byte(c))