Skip to content

Commit

Permalink
test: create 9520133, 9520110, 9502104 regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EsadCetiner authored Jan 5, 2024
1 parent 49b8fe9 commit f30f5a3
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/regression/sogo-rule-exclusions-plugin/9520101.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ meta:
name: 9520101.yaml
tests:
- test_title: 9520101-1
desc: Disable OWASP_CRS for ARGS:json.password
desc: Disable OWASP_CRS for password box when logging in
stages:
- stage:
input:
Expand Down
135 changes: 135 additions & 0 deletions tests/regression/sogo-rule-exclusions-plugin/9520104.yaml
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"
39 changes: 39 additions & 0 deletions tests/regression/sogo-rule-exclusions-plugin/9520110.yaml
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"
23 changes: 23 additions & 0 deletions tests/regression/sogo-rule-exclusions-plugin/9520133.yaml
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"

0 comments on commit f30f5a3

Please sign in to comment.