InterceptPolicy:添加protocol errors参数、且修正默认参数
This commit is contained in:
@@ -717,6 +717,28 @@ public class ExportExcel {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
//pinning
|
||||
if("exclusions_protocol_errors".equals(headerStr)) {
|
||||
commentStr="";
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
commentStr+=1+"("+msgProp.getProperty("yes")+")\n";
|
||||
index++;
|
||||
commentStr+=0+"("+msgProp.getProperty("no")+")\n";
|
||||
index++;
|
||||
if(StringUtil.isEmpty(headerStr)){
|
||||
headerStr="";
|
||||
commentStr="";
|
||||
}else{
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
//2、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":1\n";
|
||||
index++;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
//cn
|
||||
if("cert_verify_approach_cn".equals(headerStr)) {
|
||||
commentStr="";
|
||||
@@ -908,7 +930,7 @@ public class ExportExcel {
|
||||
//allow_http2
|
||||
if("ssl_ver_allow_http2".equals(headerStr)) {
|
||||
commentStr="";
|
||||
defaultValue="0";
|
||||
defaultValue="1";
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
commentStr+=1+"("+msgProp.getProperty("yes")+")\n";
|
||||
|
||||
@@ -575,6 +575,7 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
Integer certTransparency=baseIpCfg.getCertTransparency();
|
||||
Integer clientCertReq=baseIpCfg.getClientCertReq();
|
||||
Integer pinning=baseIpCfg.getPinning();
|
||||
Integer protocolErrors=baseIpCfg.getProtocolErrors();
|
||||
Integer cn=baseIpCfg.getCn();
|
||||
Integer issuer=baseIpCfg.getIssuer();
|
||||
Integer selfSigned=baseIpCfg.getSelfSigned();
|
||||
@@ -649,6 +650,16 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
}else {
|
||||
map.put("pinning", 1);
|
||||
}
|
||||
if(protocolErrors!=null) {
|
||||
if(protocolErrors!=0&&protocolErrors!=1) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("exclusions_protocol_errors","exclusions protocol errors") + " ") + ";");
|
||||
}else {
|
||||
map.put("protocol_errors", protocolErrors);
|
||||
}
|
||||
}else {
|
||||
map.put("protocol_errors", 1);
|
||||
}
|
||||
userRegionMap.put("exclusions", map);
|
||||
map=new HashMap<>();
|
||||
Map<String,Object> map1=new HashMap<>();
|
||||
@@ -724,7 +735,7 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
}
|
||||
}
|
||||
if(allowHttp2==null) {
|
||||
allowHttp2=0;
|
||||
allowHttp2=1;
|
||||
map.put("allow_http2", allowHttp2);
|
||||
}else {
|
||||
if(allowHttp2!=0&&allowHttp2!=1) {
|
||||
|
||||
@@ -521,6 +521,7 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
Integer certTransparency=baseStringCfg.getCertTransparency();
|
||||
Integer clientCertReq=baseStringCfg.getClientCertReq();
|
||||
Integer pinning=baseStringCfg.getPinning();
|
||||
Integer protocolErrors=baseStringCfg.getProtocolErrors();
|
||||
Integer cn=baseStringCfg.getCn();
|
||||
Integer issuer=baseStringCfg.getIssuer();
|
||||
Integer selfSigned=baseStringCfg.getSelfSigned();
|
||||
@@ -595,6 +596,16 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
}else {
|
||||
map.put("pinning", 1);
|
||||
}
|
||||
if(protocolErrors!=null) {
|
||||
if(protocolErrors!=0&&protocolErrors!=1) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("exclusions_protocol_errors","exclusions protocol errors") + " ") + ";");
|
||||
}else {
|
||||
map.put("protocol_errors", protocolErrors);
|
||||
}
|
||||
}else {
|
||||
map.put("protocol_errors", 1);
|
||||
}
|
||||
userRegionMap.put("exclusions", map);
|
||||
map=new HashMap<>();
|
||||
Map<String,Object> map1=new HashMap<>();
|
||||
@@ -670,7 +681,7 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
}
|
||||
}
|
||||
if(allowHttp2==null) {
|
||||
allowHttp2=0;
|
||||
allowHttp2=1;
|
||||
map.put("allow_http2", allowHttp2);
|
||||
}else {
|
||||
if(allowHttp2!=0&&allowHttp2!=1) {
|
||||
|
||||
Reference in New Issue
Block a user