aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_clickhouse.lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2020-11-09 12:53:23 +0200
committerAndrew Lewis <nerf@judo.za.org>2020-11-09 12:53:23 +0200
commite39da522f8a47c8f411ba4e6ec74d7fc4ab6f064 (patch)
treede0831b8a1e5e2f5ed5ff42c16da4b4a745a1385 /lualib/lua_clickhouse.lua
parent2c89d492083cbb95a290b41510a743a4f37065fb (diff)
downloadrspamd-e39da522f8a47c8f411ba4e6ec74d7fc4ab6f064.tar.gz
rspamd-e39da522f8a47c8f411ba4e6ec74d7fc4ab6f064.zip
[Fix] Clickhouse: escape carriage return
Diffstat (limited to 'lualib/lua_clickhouse.lua')
-rw-r--r--lualib/lua_clickhouse.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua
index 8891a89fc..e532cd643 100644
--- a/lualib/lua_clickhouse.lua
+++ b/lualib/lua_clickhouse.lua
@@ -45,11 +45,12 @@ end
local function clickhouse_quote(str)
if str then
- return str:gsub('[\'\\\n\t]', {
+ return str:gsub('[\'\\\n\t\r]', {
['\''] = [[\']],
['\\'] = [[\\]],
['\n'] = [[\n]],
['\t'] = [[\t]],
+ ['\r'] = [[\r]],
})
end