Skip to content

Commit

Permalink
fix: improve accuracy of tests (9519101, 9519103, 9510104)
Browse files Browse the repository at this point in the history
  • Loading branch information
EsadCetiner authored Mar 7, 2024
1 parent fa64d8b commit 39b0ff0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 55 deletions.
58 changes: 11 additions & 47 deletions tests/regression/roundcube-rule-exclusions-plugin/9519101.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ meta:
name: 9519101.yaml
tests:
- test_title: 9519101-1
desc: Disable CRS for password login
desc: Logging into roundcube
stages:
- stage:
input:
Expand All @@ -15,53 +15,17 @@ tests:
Host: localhost
User-Agent: Roundcube 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: application/x-www-form-urlencoded
port: 80
method: POST
uri: /post?_task=login&_pass=<script>
uri: /post?_task=login
data: |
_token=randomtoken
_task=login
_action=login
_timezone=Australia%2FSydney
_url:
_user: postmaster%40example.com
_pass: %3Cscript%3E
output:
no_log_contains: id "941110"
- test_title: 9519101-2
desc: Disable 921180 for ARGS_NAMES:_task when logging in
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: Roundcube 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
port: 80
method: POST
uri: /post?_task=login&_task=login
output:
no_log_contains: id "921180"
- test_title: 9519101-3
desc: Disable 921180 for ARGS_NAMES:_framed when logging in
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: Roundcube 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
port: 80
method: POST
uri: /post?_task=login&_framed=1&_framed=1
output:
no_log_contains: id "921180"
- test_title: 9519101-4
desc: Disable 921180 for ARGS_NAMES:_action when logging in
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: Roundcube 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
port: 80
method: POST
uri: /post?_task=login&_action=1&_action=1
output:
no_log_contains: id "921180"
12 changes: 6 additions & 6 deletions tests/regression/roundcube-rule-exclusions-plugin/9519103.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ meta:
name: 9519103.yaml
tests:
- test_title: 9519103-1
desc: Disable 932236 for _task when set to mail"
desc: Viewing mailbox"
stages:
- stage:
input:
Expand All @@ -16,12 +16,12 @@ tests:
User-Agent: Roundcube 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
port: 80
method: POST
uri: /post?_task=mail
method: get
uri: /get?_task=mail&_mbox=INBOX
output:
no_log_contains: id "932236"
- test_title: 9519103-2
desc: Disable 932236 for _task when set to settings"
desc: Viewing settings"
stages:
- stage:
input:
Expand All @@ -31,7 +31,7 @@ tests:
User-Agent: Roundcube 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
port: 80
method: POST
uri: /post?_task=settings
method: get
uri: /get?_task=settings&_action=preferences
output:
no_log_contains: id "932236"
20 changes: 18 additions & 2 deletions tests/regression/roundcube-rule-exclusions-plugin/9519104.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ tests:
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /post?_token=dfdf
uri: /post
data: |
_token=lsrandom
_task=login
_action=login
_timezone=Australia%2FSydney
_url:
_user: postmaster%40example.com
_pass: %3Cscript%3E
output:
no_log_contains: id "932236"
- test_title: 9519104-2
Expand All @@ -32,6 +40,14 @@ tests:
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /post?_token=0x800
uri: /post
data: |
_token=0x0800random
_task=login
_action=login
_timezone=Australia%2FSydney
_url:
_user: postmaster%40example.com
_pass: %3Cscript%3E
output:
no_log_contains: id "942450"

0 comments on commit 39b0ff0

Please sign in to comment.