-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: create 9520133, 9520110, 9502104 regression tests
- Loading branch information
1 parent
49b8fe9
commit f30f5a3
Showing
4 changed files
with
198 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
tests/regression/sogo-rule-exclusions-plugin/9520104.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "SOGo Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9520104.yaml | ||
tests: | ||
- test_title: 9520104-1 | ||
desc: Disable OWASP CRS for email body when sending an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/send?json.text=<script> | ||
output: | ||
no_log_contains: id "941110" | ||
- test_title: 9520104-2 | ||
desc: Disable OWASP CRS for email body when saving an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/save?json.text=<script> | ||
output: | ||
no_log_contains: id "941110" | ||
- test_title: 9520104-3 | ||
desc: Disable OWASP CRS for email subject when sending an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/send?json.subject=<script> | ||
output: | ||
no_log_contains: id "941110" | ||
- test_title: 9520104-4 | ||
desc: Disable OWASP CRS for email subject when saving an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/save?json.subject=<script> | ||
output: | ||
no_log_contains: id "941110" | ||
- test_title: 9520104-5 | ||
desc: Disable 942131 for source email address when saving an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/save?json.from=<[email protected]>Postmaster | ||
output: | ||
no_log_contains: id "942131" | ||
- test_title: 9520104-6 | ||
desc: Disable 942131 for source email address when sending an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/send?json.from=<[email protected]>Postmaster | ||
output: | ||
no_log_contains: id "942131" | ||
- test_title: 9520104-7 | ||
desc: Disable 942131 for destination email address when saving an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/save?json.to.array_0=<[email protected]>Postmaster | ||
output: | ||
no_log_contains: id "942131" | ||
- test_title: 9520104-8 | ||
desc: Disable 942131 for destination email address when sending an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/send?json.to.array_0=<[email protected]>Postmaster | ||
output: | ||
no_log_contains: id "942131" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "SOGo Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9520110.yaml | ||
tests: | ||
- test_title: 9520110-1 | ||
desc: Disable OWASP CRS when changing passwords | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/changePassword?json.oldPassword=<script> | ||
output: | ||
no_log_contains: id "941110" | ||
- test_title: 9520110-2 | ||
desc: Disable OWASP CRS when changing passwords | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/changePassword?json.newPassword=<script> | ||
output: | ||
no_log_contains: id "941110" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "SOGo Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9520133.yaml | ||
tests: | ||
- test_title: 9520133-1 | ||
desc: Disable 931130 for ARGS:json.url | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: SOGo rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
Content-Type: text/vcard | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Calendar/addWebCalendar?json.url=https://example.com | ||
output: | ||
no_log_contains: id "931130" |