劫持、注入、镜像、阻断页面、拦截证书内容引用时的处理

This commit is contained in:
wangwei
2019-06-02 16:33:49 +08:00
parent 5355c9ab9c
commit 692d00050c
25 changed files with 4642 additions and 4565 deletions

View File

@@ -139,7 +139,7 @@ function del(url){
if(validateIsDelete(checkboxes)){
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
return;
}else if(validateIsDeleteOfQuote(checkboxes)){
}else if(!validateIsDeleteOfQuote(checkboxes)){
top.$.jBox.tip("<spring:message code='file_quote_disable_delete'/>", "<spring:message code='info'/>");
return;
}else{
@@ -347,15 +347,24 @@ function cancelPassOpt(url){
var addrPoolIds = [],canCancel = true;
var compileIds = [];
var serviceId = 0;
$(checkboxes).filter(":checked").each(function(){
var addrPoolId = $(this).attr("addressPoolId");
var serviceId = $(this).attr("serviceId");
serviceId = $(this).attr("serviceId");
var compileId = $(this).attr("compileId");
if(typeof addrPoolId != "undefined"){
addrPoolIds.push(addrPoolId);
}
//记录代理证书的配置
if(typeof serviceId != "undefined" && serviceId==520 && typeof compileId != "undefined"){
var serviceIdJudge = false;
if(serviceId==520
|| serviceId==643
|| serviceId==644
|| serviceId==645
|| serviceId==646)
{
serviceIdJudge = true;
}
if(typeof serviceId != "undefined" && serviceIdJudge && typeof compileId != "undefined"){
compileIds.push(compileId);
}
});
@@ -375,27 +384,22 @@ function cancelPassOpt(url){
});
}
if(canCancel){
//查询证书是否被拦截策略引用
if(compileIds.length > 0){
//查询是否被引用(劫持、注入、进行、阻断页面、证书策略)
if(compileIds.length > 0){
$.ajax({
type:'post',
url:'${ctx}/proxy/intercept/strateagy/ajaxKeyinfIsUsed',
data:{"compileIds":compileIds.join(',')},
url:'${ctx}/proxy/statusOfUsed/ajaxRequest',
data:{"compileIds":compileIds.join(','),"isValid":1,"serviceId":serviceId},
async:false,
success:function(data){//处理返回结果
if(data == false){
top.$.jBox.tip('<spring:message code="keyring_is_used"/>');
top.$.jBox.tip('<spring:message code="file_is_used"/>');
canCancel=data;
}
}
});
}
}
//查询文件是否被引用
if(canCancel && validateIsCancelOfQuote(checkboxes)){
top.$.jBox.tip("<spring:message code='file_is_used'/>", "<spring:message code='info'/>");
canCancel=false;
}
}
if(canCancel){
doAll(checkboxes,url);
}
@@ -607,25 +611,39 @@ function validateIsDelete(checkboxes){
}
//验证文件是否其他菜单有引用且非删除状态
function validateIsDeleteOfQuote(checkboxes){
var flag = false;
$(checkboxes).filter(":checked").each(function(){
if($(this).attr("quoteStatus") != -1 && "undefined" != typeof $(this).attr("quoteStatus") && $(this).attr("quoteStatus") != ""){ //可删除的条件
flag = true;
return;
}
});
return flag;
}
//验证文件是否其他菜单引用且生效
function validateIsCancelOfQuote(checkboxes){
var flag = false;
var compileIds = [];canCancel = true;
var serviceId = 0;
$(checkboxes).filter(":checked").each(function(){
if($(this).attr("quoteStatus") == 1){ //不可取消的配置
flag = true;
return;
}
serviceId = $(this).attr("serviceId");
var compileId = $(this).attr("compileId");
var serviceIdJudge = false;
if(serviceId==520
|| serviceId==643
|| serviceId==644
|| serviceId==645
|| serviceId==646)
{
serviceIdJudge = true;
}
if(typeof serviceId != "undefined" && serviceIdJudge && typeof compileId != "undefined"){
compileIds.push(compileId);
}
});
return flag;
if(compileIds.length > 0){
$.ajax({
type:'post',
url:'${ctx}/proxy/statusOfUsed/ajaxRequest',
data:{"compileIds":compileIds.join(','),"isValid":-1,"serviceId":serviceId},
async:false,
success:function(data){//处理返回结果
if(data == false){
top.$.jBox.tip('<spring:message code="file_is_used"/>');
canCancel=data;
}
}
});
}
return canCancel;
}
//验证选择的配置,是否有审核通过的
function validatePass(checkboxes){

View File

@@ -322,7 +322,7 @@
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
<tr>
<td>
<input type="checkbox" class="i-checks" serviceId="${cfg.serviceId }" compileId="${cfg.compileId }" id="${cfg.cfgId}" quoteStatus="${cfg.userRegion4}" value="${cfg.isAudit}">
<input type="checkbox" class="i-checks" serviceId="${cfg.serviceId }" compileId="${cfg.compileId }" id="${cfg.cfgId}" value="${cfg.isAudit}">
</td>
<td>${cfg.compileId }</td>
<td>${cfg.cfgDesc }</td>

View File

@@ -314,7 +314,7 @@
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
<tr>
<td>
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" quoteStatus="${indexCfg.quote}" value="${indexCfg.isAudit}">
<input type="checkbox" class="i-checks child-checks" serviceId="${indexCfg.serviceId }" compileId="${indexCfg.compileId }" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
</td>
<td>${indexCfg.compileId }</td>
<td>${indexCfg.cfgDesc}</a></td>

View File

@@ -313,7 +313,7 @@
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
<tr>
<td>
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" quoteStatus="${indexCfg.quote}" value="${indexCfg.isAudit}">
<input type="checkbox" class="i-checks child-checks" serviceId="${indexCfg.serviceId }" compileId="${indexCfg.compileId }" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
</td>
<td>${indexCfg.compileId }</td>
<td>${indexCfg.cfgDesc}</a></td>

View File

@@ -302,7 +302,7 @@
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
<tr>
<td>
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" quoteStatus="${indexCfg.quote}" value="${indexCfg.isAudit}">
<input type="checkbox" class="i-checks child-checks" serviceId="${indexCfg.serviceId }" compileId="${indexCfg.compileId }" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
</td>
<td>${indexCfg.compileId }</td>
<td>${indexCfg.fileDesc }</td>

View File

@@ -320,7 +320,7 @@
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
<tr>
<td>
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" quoteStatus="${cfg.userRegion5}" value="${indexCfg.isAudit}">
<input type="checkbox" class="i-checks child-checks" serviceId="${indexCfg.serviceId }" compileId="${indexCfg.compileId }" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
</td>
<td>${indexCfg.compileId }</td>
<td>${indexCfg.cfgDesc}</a></td>