diff --git a/sql/inception.py b/sql/inception.py index b8358867..4d5ebbb1 100644 --- a/sql/inception.py +++ b/sql/inception.py @@ -37,10 +37,10 @@ def criticalDDL(self, sqlContent): map(lambda x: re.compile(r'(^--\s+.*|^/\*.*\*/;\s*$)').sub('', x, count=1),sqlContent.splitlines(1))).strip() for row in sqlContent.rstrip(';').split(';'): if re.match(r"([\s\S]*)drop(\s+)database(\s+.*)|([\s\S]*)drop(\s+)table(\s+.*)|([\s\S]*)truncate(\s+.*)|([\s\S]*)truncate(\s+)partition(\s+.*)|([\s\S]*)truncate(\s+)table(\s+.*)", row.lower()): - result = ('', '', 2, '驳回高危SQL', '不能包含【DROP DATABASE】|【DROP TABLE】|【TRUNCATE PARTITION】|【TRUNCATE TABLE】关键字!', row, '', '', '', '') + result = ('', '', 2, '驳回高危SQL', '不能包含【DROP DATABASE】|【DROP TABLE】|【TRUNCATE PARTITION】|【TRUNCATE TABLE】关键字!', row, '', '', '', '', '') criticalSqlFound = 1 else: - result = ('', '', 0, '', 'None', row, '', '', '', '') + result = ('', '', 0, '', 'None', row, '', '', '', '', '') resultList.append(result) if criticalSqlFound == 1: return resultList diff --git a/sql/static/sqlquery.html b/sql/static/sqlquery.html index 82595391..8aad7d40 100644 --- a/sql/static/sqlquery.html +++ b/sql/static/sqlquery.html @@ -233,7 +233,7 @@ " 脱敏时间 : sec \n" + " \n" + "