(1)字符串导入大小写敏感,是否十六进制修复

(2)http 高级导入,ftp内容关键字导入提交
(3)加入16进制大小写一定不敏感的验证提示
(4)“others”自定义域不允许导入
This commit is contained in:
wangxin
2018-10-31 17:00:40 +08:00
parent 9c41c4e848
commit 1f39824324
6 changed files with 44 additions and 13 deletions

View File

@@ -1041,8 +1041,10 @@ public class BaseController {
baseStringCfg.setIsHexbin(0); baseStringCfg.setIsHexbin(0);
} else if (isHex.intValue() == 1 && isCaseInsenstive.intValue() == 0) { } else if (isHex.intValue() == 1 && isCaseInsenstive.intValue() == 0) {
baseStringCfg.setIsHexbin(1); baseStringCfg.setIsHexbin(1);
} else if (isHex.intValue() == 1 && isCaseInsenstive.intValue() == 1) { } else if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 1) {
baseStringCfg.setIsHexbin(2); baseStringCfg.setIsHexbin(2);
}else {
errInfo.append(prop.getProperty("hex_case_insensitive")+ ";");
} }
} }
@@ -1119,6 +1121,10 @@ public class BaseController {
errInfo.append( errInfo.append(
String.format(prop.getProperty("is_incorrect"), prop.getProperty("district") + " ") String.format(prop.getProperty("is_incorrect"), prop.getProperty("district") + " ")
+ ";"); + ";");
} else if (dirtrictP.indexOf("others")>-1&&district.equals("others")) {
//不允许自定义匹配区域导入
errInfo.append(prop.getProperty("district")+" "+
String.format(prop.getProperty("can_not_be"), " 'others'")+ ";");
} }
} }
if (mulityKeywordsP.equals("0")) { if (mulityKeywordsP.equals("0")) {
@@ -1285,8 +1291,10 @@ public class BaseController {
baseStringCfg.setIsHexbin(0); baseStringCfg.setIsHexbin(0);
} else if (isHex.intValue() == 1 && isCaseInsenstive.intValue() == 0) { } else if (isHex.intValue() == 1 && isCaseInsenstive.intValue() == 0) {
baseStringCfg.setIsHexbin(1); baseStringCfg.setIsHexbin(1);
} else if (isHex.intValue() == 1 && isCaseInsenstive.intValue() == 1) { } else if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 1) {
baseStringCfg.setIsHexbin(2); baseStringCfg.setIsHexbin(2);
}else {
errInfo.append(prop.getProperty("hex_case_insensitive")+ ";");
} }
} }
} }
@@ -3346,10 +3354,10 @@ public class BaseController {
if (regionDict.getDictId().intValue() == 167) { if (regionDict.getDictId().intValue() == 167) {
interceptCfgService.saveInterceptCfg(stringCfgs); interceptCfgService.saveInterceptCfg(stringCfgs);
} }
if (regionDict.getDictId().intValue() == 15 || regionDict.getDictId().intValue() == 596) { if (regionDict.getDictId().intValue() == 9||regionDict.getDictId().intValue() == 15 || regionDict.getDictId().intValue() == 596) {
websiteCfgService.saveHttpUrlCfg(stringCfgs); websiteCfgService.saveHttpUrlCfg(stringCfgs);
} }
if (regionDict.getDictId().intValue() == 36) { if (regionDict.getDictId().intValue() == 36||regionDict.getDictId().intValue() == 37) {
fileTransferCfgService.saveFtpCfg(stringCfgs); fileTransferCfgService.saveFtpCfg(stringCfgs);
} }
if (regionDict.getFunctionId().equals(510)) { // P2p hash if (regionDict.getFunctionId().equals(510)) { // P2p hash
@@ -3367,10 +3375,8 @@ public class BaseController {
if (regionDict.getFunctionId().intValue() == 34) { if (regionDict.getFunctionId().intValue() == 34) {
websiteCfgService.saveSslCfg(stringCfgs); websiteCfgService.saveSslCfg(stringCfgs);
} }
if (regionDict.getFunctionId().intValue() == 635) { if(regionDict.getDictId().intValue()==12||regionDict.getDictId().intValue()==13||regionDict.getDictId().intValue()==601||regionDict.getDictId().intValue()==602) {
if(regionDict.getDictId().intValue()==601||regionDict.getDictId().intValue()==602) { websiteCfgService.saveHttpBodyCfg(stringCfgs);
websiteCfgService.saveHttpBodyCfg(stringCfgs);
}
} }
} else if (regionDict.getRegionType().equals(3)) { } else if (regionDict.getRegionType().equals(3)) {
for (ComplexkeywordCfg cfg : complexkeywordCfgs) { for (ComplexkeywordCfg cfg : complexkeywordCfgs) {
@@ -3427,7 +3433,12 @@ public class BaseController {
if (regionDict.getDictId().intValue() == 30 || regionDict.getDictId().intValue() == 31||regionDict.getDictId().intValue() == 599) { if (regionDict.getDictId().intValue() == 30 || regionDict.getDictId().intValue() == 31||regionDict.getDictId().intValue() == 599) {
mailCfgService.saveMailCfg(complexkeywordCfgs); mailCfgService.saveMailCfg(complexkeywordCfgs);
} }
if(regionDict.getDictId().intValue()==10) {
websiteCfgService.saveHttpReqHeadCfg(complexkeywordCfgs);
}
if(regionDict.getDictId().intValue()==11) {
websiteCfgService.saveHttpResHeadCfg(complexkeywordCfgs);
}
} }
if (cfgIndexInfos != null && cfgIndexInfos.size() > 0) { if (cfgIndexInfos != null && cfgIndexInfos.size() > 0) {
ipCfgService.saveCfgIndexOf(cfgIndexInfos); ipCfgService.saveCfgIndexOf(cfgIndexInfos);

View File

@@ -172,6 +172,20 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
websiteCfgDao.saveHttpBodyCfg(_cfg); websiteCfgDao.saveHttpBodyCfg(_cfg);
} }
} }
public void saveHttpReqHeadCfg(List<ComplexkeywordCfg> cfgs) {
for(ComplexkeywordCfg cfg:cfgs){
HttpReqHeadCfg _cfg=new HttpReqHeadCfg();
BeanUtils.copyProperties(cfg,_cfg);
websiteCfgDao.saveHttpReqHdrCfg(_cfg);
}
}
public void saveHttpResHeadCfg(List<ComplexkeywordCfg> cfgs) {
for(ComplexkeywordCfg cfg:cfgs){
HttpResHeadCfg _cfg=new HttpResHeadCfg();
BeanUtils.copyProperties(cfg,_cfg);
websiteCfgDao.saveHttpResHdrCfg(_cfg);
}
}
public void saveHttpCfg(CfgIndexInfo entity){ public void saveHttpCfg(CfgIndexInfo entity){
//设置区域运营商信息 //设置区域运营商信息
setAreaEffectiveIds(entity); setAreaEffectiveIds(entity);

View File

@@ -1299,4 +1299,5 @@ av_protocol_note=Note:Recognizable Protocols Include RTSP,RTMP.
ip_range_in_the_same=Start IP and end IP in a IP range must with in the same subnet ip_range_in_the_same=Start IP and end IP in a IP range must with in the same subnet
log_to_url=To HTTP URL log_to_url=To HTTP URL
source_compile_id=Configuration Source source_compile_id=Configuration Source
most_keywords=%s can have 1024 chars at most most_keywords=%s can have 1024 chars at most
hex_case_insensitive=Hexadecimal values must case insensitive

View File

@@ -1297,4 +1297,5 @@ av_protocol_note=Note:Recognizable Protocols Include RTSP,RTMP.
log_to_url=To HTTP URL log_to_url=To HTTP URL
source_compile_id=Configuration Source source_compile_id=Configuration Source
av_protocol_note=Note:Recognizable Protocols Include RTSP,RTMP. av_protocol_note=Note:Recognizable Protocols Include RTSP,RTMP.
most_keywords=%s can have 1024 chars at most most_keywords=%s can have 1024 chars at most
hex_case_insensitive=Hexadecimal values must case insensitive

View File

@@ -1291,4 +1291,5 @@ av_protocol_note=\u6CE8\uFF1A\u53EF\u8BC6\u522B\u534F\u8BAE\u5305\u62EC RTSP\u30
ip_range_in_the_same=IP\u8303\u56F4\u7684\u8D77\u59CBIP\u4E0E\u7EC8\u6B62IP\u5FC5\u987B\u5728\u76F8\u540C\u7F51\u6BB5 ip_range_in_the_same=IP\u8303\u56F4\u7684\u8D77\u59CBIP\u4E0E\u7EC8\u6B62IP\u5FC5\u987B\u5728\u76F8\u540C\u7F51\u6BB5
log_to_url=\u8F6CHTTP URL\u914D\u7F6E log_to_url=\u8F6CHTTP URL\u914D\u7F6E
source_compile_id=\u914D\u7F6E\u6765\u6E90 source_compile_id=\u914D\u7F6E\u6765\u6E90
most_keywords=%s\u6700\u591A\u5305\u542B1024\u4E2A\u5B57\u7B26 most_keywords=%s\u6700\u591A\u5305\u542B1024\u4E2A\u5B57\u7B26
hex_case_insensitive=16\u8FDB\u5236\u7684\u503C\u5927\u5C0F\u5199\u4E0D\u654F\u611F

View File

@@ -12,4 +12,7 @@ UPDATE function_service_dict SET is_import=1 WHERE function_id=34;
update function_region_dict set is_import=1 where function_id=635; update function_region_dict set is_import=1 where function_id=635;
#邮件地址 #邮件地址
UPDATE function_region_dict SET is_import=1 WHERE function_id=37 AND dict_id=599; UPDATE function_region_dict SET is_import=1 WHERE function_id=37 AND dict_id=599;
UPDATE function_region_dict SET is_import=0 WHERE function_id=37 AND dict_id=600; UPDATE function_region_dict SET is_import=0 WHERE function_id=37 AND dict_id=600;
#http 高级
UPDATE function_region_dict SET is_import=1 WHERE function_id=8 AND dict_id IN(9,10,11,12,13);