-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fp with creating/uploading shares and files (#77)
- Loading branch information
1 parent
75dfd32
commit 080db7d
Showing
2 changed files
with
99 additions
and
15 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
64 changes: 64 additions & 0 deletions
64
tests/regression/nextcloud-rule-exclusions-plugin/9508172.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,64 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Nextcloud Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9508172.yaml | ||
tests: | ||
- test_title: 9508172-1 | ||
desc: Creating a new share for a file/folder | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: OWASP CRS test agent | ||
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 | ||
port: 80 | ||
method: POST | ||
uri: /ocs/v2.php/apps/files_sharing/api/v1/shares | ||
data: | | ||
{"path":"/path/to/tmp/example/","shareType":3,"password":"<script>","attributes":"[]"} | ||
version: HTTP/1.1 | ||
output: | ||
no_log_contains: | | ||
id "930120" | id "941110" | ||
- test_title: 9508172-2 | ||
desc: Editing an existing share | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: OWASP CRS test agent | ||
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 | ||
port: 80 | ||
method: PUT | ||
uri: /ocs/v2.php/apps/files_sharing/api/v1/shares/1 | ||
data: | | ||
{"permissions":"31","attributes":"[]","note":"","expireDate":"2024-06-23 00:00:00","label":"test","password":"<script>","hideDownload":"false"} | ||
version: HTTP/1.1 | ||
output: | ||
no_log_contains: | | ||
id "911100" | id "930120" | id "941110" | ||
- test_title: 9508172-3 | ||
desc: Deleting an share | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: OWASP CRS test agent | ||
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 | ||
port: 80 | ||
method: DELETE | ||
uri: /ocs/v2.php/apps/files_sharing/api/v1/shares/1 | ||
version: HTTP/1.1 | ||
output: | ||
no_log_contains: id "911100" |