Skip to content

Commit

Permalink
Merge pull request jly8866#1 from jly8866/master
Browse files Browse the repository at this point in the history
 Merge
  • Loading branch information
hhyo authored Feb 16, 2019
2 parents 96da8bf + c7c668e commit 55cc902
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sql/inception.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sql/static/sqlquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
" <small>脱敏时间 : <strong id=\"masking_time" + tab_number + "\"> sec </strong></small>\n" +
" </div>\n" +
" <table id=\"query_result" + tab_number + "\" data-toggle=\"table\" class=\"table table-condensed\"\n" +
" style=\"table-layout:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;\"></table>\n" +
" style=\"table-layout:inherit;white-space:nowrap;text-overflow:ellipsis;\"></table>\n" +
"</div>\t";
$("#tab-content").append(div);//div添加到div

Expand Down
4 changes: 2 additions & 2 deletions sql/static/submitSql.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ <h4 class="panel-title">
</div>
<div id="collapseOne" class="panel-collapse
collapse">
<div class="panel-body" style="margin-left:
25px">
<div class="panel-body" id="sub_review_man_panel_body" style="margin-left:25px">
{% for man in reviewMen %}
<div class="radio" id="{{ man }}">
<input type="radio" id="radio1"
Expand Down Expand Up @@ -306,6 +305,7 @@ <h4 class="modal-title text-danger">提交信息确认</h4>

$("#review_man").change(function review_man() {
var review_man = $(this).val();
$("div#sub_review_man_panel_body").children(".radio").show();
$("div#" + review_man).hide();
});
</script>
Expand Down

0 comments on commit 55cc902

Please sign in to comment.