]> source.dussan.org Git - rspamd.git/commitdiff
handle nil
authorTarmo Oja <tarmo.oja@cyber.ee>
Fri, 23 Aug 2024 12:00:27 +0000 (15:00 +0300)
committerTarmo Oja <tarmo.oja@cyber.ee>
Fri, 23 Aug 2024 12:00:27 +0000 (15:00 +0300)
lualib/lua_util.lua

index 8f44e25f20c4c47aed9b5c9d35336c0024d704c7..88599407c43735ed25afe83e7229c01dcb1586ca 100644 (file)
@@ -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))