Commit 399bd4ac authored by song-tianyang's avatar song-tianyang Committed by song-tianyang
Browse files

fix(测试跟踪): 修复自定义插件功能引起的安全漏洞及用例模块匹配问题

parent 0ceee143
Showing with 5 additions and 12 deletions
+5 -12
......@@ -410,13 +410,11 @@ public class MsHTTPSamplerProxy extends MsTestElement {
this.useEnvironment = config.getConfig().get(this.getProjectId()).getApiEnvironmentid();
}
String url = httpConfig.getProtocol() + "://" + httpConfig.getSocket();
// 补充如果是完整URL 则用自身URL
if (StringUtils.isNotEmpty(this.getUrl()) && ElementUtil.isURL(this.getUrl())) {
url = this.getUrl();
}
if (isUrl()) {
// 补充如果是完整URL 则用自身URL
if (StringUtils.isNotEmpty(this.getUrl()) && ElementUtil.isURL(this.getUrl())) {
url = this.getUrl();
}
if (this.isCustomizeReq()) {
url = this.getUrl();
sampler.setProperty("HTTPSampler.path", url);
......@@ -633,9 +631,6 @@ public class MsHTTPSamplerProxy extends MsTestElement {
}
return true;
}
if (StringUtils.isNotEmpty(this.getUrl()) && ElementUtil.isURL(this.getUrl())) {
return true;
}
return false;
}
......@@ -811,6 +806,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
} else {
TestPlanApiCaseService testPlanApiCaseService = CommonBeanFactory.getBean(TestPlanApiCaseService.class);
TestPlanApiCase testPlanApiCase = testPlanApiCaseService.getById(this.getId());
testPlanApiCase = testPlanApiCase == null ? testPlanApiCaseService.getById(this.getName()) : testPlanApiCase;
if (testPlanApiCase != null) {
ApiTestCaseWithBLOBs caseWithBLOBs = apiTestCaseService.get(testPlanApiCase.getApiCaseId());
if (caseWithBLOBs != null) {
......
......@@ -69,9 +69,6 @@ public class ShiroUtils {
//mock接口
filterChainDefinitionMap.put("/mock/**", "anon");
filterChainDefinitionMap.put("/ws/**", "anon");
filterChainDefinitionMap.put("/plugin/**", "anon");
}
public static void ignoreCsrfFilter(Map<String, String> filterChainDefinitionMap) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment