Skip to content

Commit 77b51ec

Browse files
committed
Test target REQUEST_COOKIES_NAMES
Signed-off-by: Sebitosh <[email protected]>
1 parent 6505335 commit 77b51ec

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
target: REQUEST_COOKIES
2+
rulefile: MRTS_059_REQUEST_COOKIES.conf
3+
testfile: MRTS_059_REQUEST_COOKIES.yaml
4+
templates:
5+
- SecRule for TARGETS
6+
colkey:
7+
- - ''
8+
- - cookie1
9+
- - cookie1
10+
- cookie2
11+
- - /^cookie_.*$/
12+
operator:
13+
- '@contains'
14+
oparg:
15+
- attack
16+
phase:
17+
- 1
18+
- 2
19+
- 3
20+
- 4
21+
testdata:
22+
phase_methods:
23+
1: get
24+
2: post
25+
3: post
26+
4: post
27+
targets:
28+
- target: ''
29+
test:
30+
data: null
31+
input:
32+
headers:
33+
- name: Cookie
34+
value: foo=attack
35+
- target: cookie1
36+
test:
37+
data: null
38+
input:
39+
headers:
40+
- name: Cookie
41+
value: cookie1=attack
42+
- target: cookie1
43+
test:
44+
data: null
45+
input:
46+
headers:
47+
- name: Cookie
48+
value: cookie1=attack;cookie2=hello
49+
- target: cookie2
50+
test:
51+
data: null
52+
input:
53+
headers:
54+
- name: Cookie
55+
value: cookie2=attack
56+
- target: cookie2
57+
test:
58+
data: null
59+
input:
60+
headers:
61+
- name: Cookie
62+
value: cookie1=hello;cookie2=attack
63+
- target: /^cookie_.*$/
64+
test:
65+
data: null
66+
input:
67+
headers:
68+
- name: Cookie
69+
value: cookie_foo=attack
70+
- target: /^cookie_.*$/
71+
test:
72+
data: null
73+
input:
74+
headers:
75+
- name: Cookie
76+
value: cookie_bar=hello;cookie_foo=attack;cookie_foobar=world

0 commit comments

Comments
 (0)