]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Clickhouse: escape carriage return 3547/head
authorAndrew Lewis <nerf@judo.za.org>
Mon, 9 Nov 2020 10:53:23 +0000 (12:53 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Mon, 9 Nov 2020 10:53:23 +0000 (12:53 +0200)
lualib/lua_clickhouse.lua

index 8891a89fc87e2a55aa9d4a63f42caff3f1b2fc0d..e532cd643c4e53d5df32cf8449d16b83b90c2f37 100644 (file)
@@ -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