-
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.
fix: differences between modsec v2 and v3 json variables (#2)
- Loading branch information
1 parent
726e4d6
commit bee2d48
Showing
10 changed files
with
116 additions
and
207 deletions.
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
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 |
---|---|---|
|
@@ -15,8 +15,11 @@ tests: | |
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: application/json;charset=UTF-8 | ||
port: 80 | ||
method: POST | ||
uri: /SOGo/connect?json.password=<script> | ||
uri: /SOGo/connect | ||
data: | | ||
{ "userName": "[email protected]", "password": "<script>", "domain": null, "rememberLogin": 0 } | ||
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ meta: | |
name: 9520104.yaml | ||
tests: | ||
- test_title: 9520104-1 | ||
desc: Disable OWASP CRS for email body when sending an email | ||
desc: Sending an email | ||
stages: | ||
- stage: | ||
input: | ||
|
@@ -15,14 +15,16 @@ tests: | |
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 | ||
Content-Type: application/json;charset=UTF-8 | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/send?json.text=<script> | ||
method: POST | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/send | ||
data: | | ||
{"to":["postmaster <[email protected]>"],"cc":[],"bcc":[],"isHTML":1,"text":"<p><script></p>","from":"postmaster <[email protected]>","locale":"en","subject":"<script>"} | ||
output: | ||
no_log_contains: id "941110" | ||
- test_title: 9520104-2 | ||
desc: Disable OWASP CRS for email body when saving an email | ||
desc: Saving an draft email | ||
stages: | ||
- stage: | ||
input: | ||
|
@@ -31,105 +33,11 @@ tests: | |
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 | ||
Content-Type: application/json;charset=UTF-8 | ||
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: | ||
method: POST | ||
uri: /SOGo/so/[email protected]/Mail/4/folderDrafts/newDraft-4/save | ||
data: | | ||
{"to":["postmaster <[email protected]>"],"cc":[],"bcc":[],"isHTML":1,"text":"<p><script></p>","from":"postmaster <[email protected]>","locale":"en","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
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ meta: | |
name: 9520120.yaml | ||
tests: | ||
- test_title: 9520120-1 | ||
desc: Disable 931130 for ARGS:json.urls.array_0.value | ||
desc: Creating/modifying a contact | ||
stages: | ||
- stage: | ||
input: | ||
|
@@ -15,8 +15,13 @@ tests: | |
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: application/json;charset=UTF-8 | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Contacts/work-contacts/john-doe.vcf/saveAsContact?json.urls.array_0.value=https://example.com/ | ||
method: POST | ||
uri: /SOGo/so/[email protected]/Contacts/work-contacts/john-doe.vcf/saveAsContact | ||
data: | | ||
{ "refs":[],"categories":[],"c_screenname":null,"pid":"personal","c_component":"vcard","notes":[""],"empty":" ","isNew":true,"id":"1C0-65E5E480-9-2141CA00.vcf", | ||
"urls":[{"type":"work","value":"https://www.fsf.org/"}],"c_cn":"display name","c_givenname":"Firstname","c_sn":"Lastname","nickname":"Nickname","org":"org","title":"title","role":"role", | ||
"addresses":[{"type":"","postoffice":"","street":"","street2":"","locality":"","region":"","country":"","postalcode":""}],"birthday":"" } | ||
output: | ||
no_log_contains: id "931130" |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ meta: | |
name: 9520121.yaml | ||
tests: | ||
- test_title: 9520121-1 | ||
desc: Disable 931130 for ARGS:json.cardDavURL | ||
desc: Modifying an addressbook properties | ||
stages: | ||
- stage: | ||
input: | ||
|
@@ -15,8 +15,12 @@ tests: | |
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: application/json;charset=UTF-8 | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Contacts/work-contacts/save?json.cardDavURL=https://example.com/ | ||
method: POST | ||
uri: /SOGo/so/[email protected]/Contacts/work-contacts/save | ||
data: | | ||
{ "name":"test","isEditable":true,"isRemote":false,"owner":"[email protected]","isOwned":true,"isSubscription":false,"id":"1BE-65E5E580-B-1B22B300", | ||
"publicCardDavURL":"","cardDavURL":"https://sogo.example.com/SOGo/dav/[email protected]/Contacts/1BE-65E5E580-B-1B22B300/","synchronize":1 } | ||
output: | ||
no_log_contains: id "931130" |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ meta: | |
name: 9520130.yaml | ||
tests: | ||
- test_title: 9520130-1 | ||
desc: Disable 931130 for ARGS:json.attachUrls.array_0.value | ||
desc: Creating a new calendar task | ||
stages: | ||
- stage: | ||
input: | ||
|
@@ -15,13 +15,20 @@ tests: | |
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: application/json;charset=UTF-8 | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Calendar/mycalendar/calendar.ics/saveAsTask?json.attachUrls.array_0.value=https://example.com/ | ||
method: POST | ||
uri: /SOGo/so/[email protected]/Calendar/mycalendar/calendar.ics/saveAsTask | ||
data: | | ||
{"categories":[],"alarm":{},"delta":60,"pid":"personal","type":"task","completed":"2024-03-04T15:37:15.262Z", | ||
"$hasAlarm":false,"classification":"confidential","destinationCalendar":"personal","selected":false,"isNew":true, | ||
"id":"1BB-65E5EA80-1-7B69C580.ics","sendAppointmentNotifications":1,"attachUrls":[{"value":"https://example.com/"}], | ||
"summary":"test","due":"2024-03-04T15:30:26.610Z","dueDate":"2024-03-05","start":"2024-03-04T15:30:27.775Z","priority":4,"comment":"test", | ||
"location":"test","startDate":"2024-03-05","startTime":"02:30","endDate":"","endTime":"","dueTime":"02:30","completedDate":"2024-03-05"} | ||
output: | ||
no_log_contains: id "931130" | ||
- test_title: 9520130-2 | ||
desc: Disable 931130 for ARGS:json.attachUrls.array_0.value | ||
desc: Modifying an existing Calendar task | ||
stages: | ||
- stage: | ||
input: | ||
|
@@ -30,8 +37,16 @@ tests: | |
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: application/json;charset=UTF-8 | ||
port: 80 | ||
method: GET | ||
uri: /SOGo/so/[email protected]/Calendar/mycalendar/calendar.ics/save?json.attachUrls.array_0.value=https://example.com/ | ||
method: POST | ||
uri: /SOGo/so/[email protected]/Calendar/mycalendar/calendar.ics/save | ||
data: | | ||
{"categories":[],"alarm":{},"delta":60,"calendar":"Personal Calendar","component":"vtodo","location":"test", | ||
"localizedDueTime":"02:30","id":"1BB-65E5EA80-1-7B69C580.ics","priority":5,"localizedStartTime":"02:30","dueDate":"2024-03-05", | ||
"sendAppointmentNotifications":1,"isErasable":1,"attachUrls":[{"value":"https://example.com/"}],"comment":"test","startDate":"2024-03-05", | ||
"localizedDueDate":"Tuesday, March 05, 2024","localizedStartDate":"Tuesday, March 05, 2024","summary":"test","classification":"confidential", | ||
"isEditable":1,"pid":"personal","type":"task","start":"2024-03-04T15:30:00.000Z","due":"2024-03-04T15:30:00.000Z","completed":"2024-03-04T15:40:01.319Z", | ||
"$hasAlarm":false,"destinationCalendar":"personal","selected":false,"startTime":"02:30","endDate":"","endTime":"","dueTime":"02:30","completedDate":"2024-03-05"} | ||
output: | ||
no_log_contains: id "931130" |
Oops, something went wrong.