File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
# -*- coding: utf-8 -*-
3
3
4
4
import os
5
- import time
6
5
import logging
6
+ import shlex
7
7
8
8
from clickhouse_mysql .writer .writer import Writer
9
9
from clickhouse_mysql .tableprocessor import TableProcessor
@@ -80,13 +80,13 @@ def insert(self, event_or_events=None):
80
80
81
81
choptions = ""
82
82
if self .host :
83
- choptions += " --host=" + self .host
83
+ choptions += " --host=" + shlex . quote ( self .host )
84
84
if self .port :
85
85
choptions += " --port=" + str (self .port )
86
86
if self .user :
87
- choptions += " --user=" + self .user
87
+ choptions += " --user=" + shlex . quote ( self .user )
88
88
if self .password :
89
- choptions += " --password=" + self .password
89
+ choptions += " --password=" + shlex . quote ( self .password )
90
90
bash = "tail -n +2 '{0}' | clickhouse-client {1} --query='{2}'" .format (
91
91
event .filename ,
92
92
choptions ,
You can’t perform that action at this time.
0 commit comments