mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Changes ENV test case to read the default MODSECURTIY env var
This commit is contained in:
parent
b736f0292d
commit
25bb1f1bcc
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
|||||||
v3.0.4 - YYYY-MMM-DD (to be released)
|
v3.0.4 - YYYY-MMM-DD (to be released)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
|
- Changes ENV test case to read the default MODSECURTIY env var
|
||||||
|
[@zimmerle]
|
||||||
- Regression: Sets MODSECURITY env var during the tests execution
|
- Regression: Sets MODSECURITY env var during the tests execution
|
||||||
[@zimmerle]
|
[@zimmerle]
|
||||||
- Fix setenv action to strdup key=variable
|
- Fix setenv action to strdup key=variable
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"enabled":1,
|
"enabled":1,
|
||||||
"version_min":300000,
|
"version_min":300000,
|
||||||
"title":"Testing Variables :: ENV (1/3)",
|
"title":"Testing Variables :: ENV (1/4)",
|
||||||
"client":{
|
"client":{
|
||||||
"ip":"200.249.12.31",
|
"ip":"200.249.12.31",
|
||||||
"port":123
|
"port":123
|
||||||
@ -46,7 +46,7 @@
|
|||||||
{
|
{
|
||||||
"enabled":1,
|
"enabled":1,
|
||||||
"version_min":300000,
|
"version_min":300000,
|
||||||
"title":"Testing Variables :: ENV (2/3)",
|
"title":"Testing Variables :: ENV (2/4)",
|
||||||
"client":{
|
"client":{
|
||||||
"ip":"200.249.12.31",
|
"ip":"200.249.12.31",
|
||||||
"port":123
|
"port":123
|
||||||
@ -80,17 +80,62 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"expected":{
|
"expected":{
|
||||||
"debug_log":"Variable: ENV:TERM"
|
"debug_log":"regression tests\" .Variable: ENV:MODSECURITY."
|
||||||
},
|
},
|
||||||
"rules":[
|
"rules":[
|
||||||
"SecRuleEngine On",
|
"SecRuleEngine On",
|
||||||
"SecRule ENV:TERM \"@contains test\" \"id:1,phase:3,pass,t:trim\""
|
"SecRule ENV:MODSECURITY \"@contains test\" \"id:1,phase:3,pass,t:trim\""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"enabled":1,
|
"enabled":1,
|
||||||
"version_min":300000,
|
"version_min":300000,
|
||||||
"title":"Testing Variables :: ENV (3/3)",
|
"title":"Testing Variables :: ENV (3/4)",
|
||||||
|
"client":{
|
||||||
|
"ip":"200.249.12.31",
|
||||||
|
"port":123
|
||||||
|
},
|
||||||
|
"server":{
|
||||||
|
"ip":"200.249.12.31",
|
||||||
|
"port":80
|
||||||
|
},
|
||||||
|
"request":{
|
||||||
|
"headers":{
|
||||||
|
"Host":"localhost",
|
||||||
|
"User-Agent":"curl/7.38.0",
|
||||||
|
"Accept":"*/*",
|
||||||
|
"Content-Length": "27",
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
|
},
|
||||||
|
"uri":"/",
|
||||||
|
"method":"POST",
|
||||||
|
"body": [
|
||||||
|
"param1=value1¶m2=value2"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"response":{
|
||||||
|
"headers":{
|
||||||
|
"Date":"Mon, 13 Jul 2015 20:02:41 GMT",
|
||||||
|
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT",
|
||||||
|
"Content-Type":"text/html"
|
||||||
|
},
|
||||||
|
"body":[
|
||||||
|
"no need."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"expected":{
|
||||||
|
"debug_log":"Target value: \"bar\" .Variable: ENV:modfoo."
|
||||||
|
},
|
||||||
|
"rules":[
|
||||||
|
"SecRuleEngine On",
|
||||||
|
"SecRule ARGS \"@contains value\" \"id:1,phase:3,pass,t:trim,setenv:modfoo=bar\"",
|
||||||
|
"SecRule ENV:modfoo \"@contains test\" \"id:2,phase:3,pass,t:trim\""
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enabled":1,
|
||||||
|
"version_min":300000,
|
||||||
|
"title":"Testing Variables :: ENV (4/4)",
|
||||||
"client":{
|
"client":{
|
||||||
"ip":"200.249.12.31",
|
"ip":"200.249.12.31",
|
||||||
"port":123
|
"port":123
|
||||||
|
Loading…
x
Reference in New Issue
Block a user