diff options
author | Tarmo Oja <tarmo.oja@cyber.ee> | 2024-08-23 15:00:27 +0300 |
---|---|---|
committer | Tarmo Oja <tarmo.oja@cyber.ee> | 2024-08-23 15:00:27 +0300 |
commit | b37440609e71c21b7b3f225dcaf021b53c7d078c (patch) | |
tree | 78d581330b3bc423d0cb9f59a2ebe3ba4c1dcfe4 /lualib | |
parent | 0f2d38dea046cfdfc6267a74625ce45be3f6d21c (diff) | |
download | rspamd-b37440609e71c21b7b3f225dcaf021b53c7d078c.tar.gz rspamd-b37440609e71c21b7b3f225dcaf021b53c7d078c.zip |
handle nil
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_util.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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)) |