Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
399bd4ac
Commit
399bd4ac
authored
3 years ago
by
song-tianyang
Committed by
song-tianyang
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix(测试跟踪): 修复自定义插件功能引起的安全漏洞及用例模块匹配问题
parent
0ceee143
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java
+5
-9
...pi/dto/definition/request/sampler/MsHTTPSamplerProxy.java
backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java
+0
-3
...rc/main/java/io/metersphere/commons/utils/ShiroUtils.java
with
5 additions
and
12 deletions
+5
-12
backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java
+
5
-
9
View file @
399bd4ac
...
@@ -410,13 +410,11 @@ public class MsHTTPSamplerProxy extends MsTestElement {
...
@@ -410,13 +410,11 @@ public class MsHTTPSamplerProxy extends MsTestElement {
this
.
useEnvironment
=
config
.
getConfig
().
get
(
this
.
getProjectId
()).
getApiEnvironmentid
();
this
.
useEnvironment
=
config
.
getConfig
().
get
(
this
.
getProjectId
()).
getApiEnvironmentid
();
}
}
String
url
=
httpConfig
.
getProtocol
()
+
"://"
+
httpConfig
.
getSocket
();
String
url
=
httpConfig
.
getProtocol
()
+
"://"
+
httpConfig
.
getSocket
();
// 补充如果是完整URL 则用自身URL
if
(
StringUtils
.
isNotEmpty
(
this
.
getUrl
())
&&
ElementUtil
.
isURL
(
this
.
getUrl
()))
{
url
=
this
.
getUrl
();
}
if
(
isUrl
())
{
if
(
isUrl
())
{
// 补充如果是完整URL 则用自身URL
if
(
StringUtils
.
isNotEmpty
(
this
.
getUrl
())
&&
ElementUtil
.
isURL
(
this
.
getUrl
()))
{
url
=
this
.
getUrl
();
}
if
(
this
.
isCustomizeReq
())
{
if
(
this
.
isCustomizeReq
())
{
url
=
this
.
getUrl
();
url
=
this
.
getUrl
();
sampler
.
setProperty
(
"HTTPSampler.path"
,
url
);
sampler
.
setProperty
(
"HTTPSampler.path"
,
url
);
...
@@ -633,9 +631,6 @@ public class MsHTTPSamplerProxy extends MsTestElement {
...
@@ -633,9 +631,6 @@ public class MsHTTPSamplerProxy extends MsTestElement {
}
}
return
true
;
return
true
;
}
}
if
(
StringUtils
.
isNotEmpty
(
this
.
getUrl
())
&&
ElementUtil
.
isURL
(
this
.
getUrl
()))
{
return
true
;
}
return
false
;
return
false
;
}
}
...
@@ -811,6 +806,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
...
@@ -811,6 +806,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
}
else
{
}
else
{
TestPlanApiCaseService
testPlanApiCaseService
=
CommonBeanFactory
.
getBean
(
TestPlanApiCaseService
.
class
);
TestPlanApiCaseService
testPlanApiCaseService
=
CommonBeanFactory
.
getBean
(
TestPlanApiCaseService
.
class
);
TestPlanApiCase
testPlanApiCase
=
testPlanApiCaseService
.
getById
(
this
.
getId
());
TestPlanApiCase
testPlanApiCase
=
testPlanApiCaseService
.
getById
(
this
.
getId
());
testPlanApiCase
=
testPlanApiCase
==
null
?
testPlanApiCaseService
.
getById
(
this
.
getName
())
:
testPlanApiCase
;
if
(
testPlanApiCase
!=
null
)
{
if
(
testPlanApiCase
!=
null
)
{
ApiTestCaseWithBLOBs
caseWithBLOBs
=
apiTestCaseService
.
get
(
testPlanApiCase
.
getApiCaseId
());
ApiTestCaseWithBLOBs
caseWithBLOBs
=
apiTestCaseService
.
get
(
testPlanApiCase
.
getApiCaseId
());
if
(
caseWithBLOBs
!=
null
)
{
if
(
caseWithBLOBs
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java
+
0
-
3
View file @
399bd4ac
...
@@ -69,9 +69,6 @@ public class ShiroUtils {
...
@@ -69,9 +69,6 @@ public class ShiroUtils {
//mock接口
//mock接口
filterChainDefinitionMap
.
put
(
"/mock/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/mock/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/ws/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/ws/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/plugin/**"
,
"anon"
);
}
}
public
static
void
ignoreCsrfFilter
(
Map
<
String
,
String
>
filterChainDefinitionMap
)
{
public
static
void
ignoreCsrfFilter
(
Map
<
String
,
String
>
filterChainDefinitionMap
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help