commit fd8fa3e: [Minor] Clickhouse: Fix escaping
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Jun 17 16:49:07 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-06-17 17:45:00 +0100
URL: https://github.com/rspamd/rspamd/commit/fd8fa3e700f834c758cc673cc34b2f9c44a9e5d2 (HEAD -> master)
[Minor] Clickhouse: Fix escaping
---
lualib/lua_clickhouse.lua | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua
index 1aca0f719..ad5b51dce 100644
--- a/lualib/lua_clickhouse.lua
+++ b/lualib/lua_clickhouse.lua
@@ -45,10 +45,10 @@ end
local function clickhouse_quote(str)
if str then
return str:gsub('[\'\\\n\t]', {
- ['\''] = '\\\'',
- ['\\'] = '\\',
- ['\n'] = '\\n',
- ['\t'] = '\\t'
+ ['\''] = [[\']],
+ ['\\'] = [[\\]],
+ ['\n'] = [[\n]],
+ ['\t'] = [[\t]],
}):lower()
end
More information about the Commits
mailing list