aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/filesdrop_features/filesdrop.feature
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/filesdrop_features/filesdrop.feature')
-rw-r--r--build/integration/filesdrop_features/filesdrop.feature186
1 files changed, 182 insertions, 4 deletions
diff --git a/build/integration/filesdrop_features/filesdrop.feature b/build/integration/filesdrop_features/filesdrop.feature
index 4a8759e241a..7618a31a1d0 100644
--- a/build/integration/filesdrop_features/filesdrop.feature
+++ b/build/integration/filesdrop_features/filesdrop.feature
@@ -1,3 +1,5 @@
+# SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+# SPDX-License-Identifier: AGPL-3.0-or-later
Feature: FilesDrop
Scenario: Put file via files drop
@@ -31,7 +33,7 @@ Feature: FilesDrop
And Downloading file "/drop/a (2).txt"
Then Downloaded content should be "def"
- Scenario: Files drop ignores directory
+ Scenario: Files drop forbid directory without a nickname
Given user "user0" exists
And As an "user0"
And user "user0" created a folder "/drop"
@@ -42,10 +44,9 @@ Feature: FilesDrop
And Updating last share with
| permissions | 4 |
When Dropping file "/folder/a.txt" with "abc"
- And Downloading file "/drop/a.txt"
- Then Downloaded content should be "abc"
+ Then the HTTP status code should be "400"
- Scenario: Files drop forbis MKCOL
+ Scenario: Files drop forbid MKCOL without a nickname
Given user "user0" exists
And As an "user0"
And user "user0" created a folder "/drop"
@@ -56,4 +57,181 @@ Feature: FilesDrop
And Updating last share with
| permissions | 4 |
When Creating folder "folder" in drop
+ Then the HTTP status code should be "400"
+
+ Scenario: Files drop allows MKCOL with a nickname
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 3 |
+ | publicUpload | true |
+ And Updating last share with
+ | permissions | 4 |
+ When Creating folder "folder" in drop as "nickname"
+ Then the HTTP status code should be "201"
+
+ Scenario: Files drop forbid subfolder creation without a nickname
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 3 |
+ | publicUpload | true |
+ And Updating last share with
+ | permissions | 4 |
+ When dropping file "/folder/a.txt" with "abc"
+ Then the HTTP status code should be "400"
+
+ Scenario: Files request drop
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder/a.txt" with "abc" as "Alice"
+ And Downloading file "/drop/Alice/folder/a.txt"
+ Then Downloaded content should be "abc"
+
+ Scenario: File drop uploading folder with name of file
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder" with "its a file" as "Alice"
+ Then the HTTP status code should be "201"
+ When Dropping file "/folder/a.txt" with "abc" as "Alice"
+ Then the HTTP status code should be "201"
+ When Downloading file "/drop/Alice/folder"
+ Then the HTTP status code should be "200"
+ And Downloaded content should be "its a file"
+ When Downloading file "/drop/Alice/folder (2)/a.txt"
+ Then Downloaded content should be "abc"
+
+ Scenario: File drop uploading file with name of folder
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder/a.txt" with "abc" as "Alice"
+ Then the HTTP status code should be "201"
+ When Dropping file "/folder" with "its a file" as "Alice"
+ Then the HTTP status code should be "201"
+ When Downloading file "/drop/Alice/folder/a.txt"
+ Then the HTTP status code should be "200"
+ And Downloaded content should be "abc"
+ When Downloading file "/drop/Alice/folder (2)"
+ Then the HTTP status code should be "200"
+ And Downloaded content should be "its a file"
+
+ Scenario: Put file same file multiple times via files drop
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder/a.txt" with "abc" as "Mallory"
+ And Dropping file "/folder/a.txt" with "def" as "Mallory"
+ # Ensure folder structure and that we only checked
+ # for files duplicates, but merged the existing folders
+ Then as "user0" the folder "/drop/Mallory" exists
+ Then as "user0" the folder "/drop/Mallory/folder" exists
+ Then as "user0" the folder "/drop/Mallory (2)" does not exist
+ Then as "user0" the folder "/drop/Mallory/folder (2)" does not exist
+ Then as "user0" the file "/drop/Mallory/folder/a.txt" exists
+ Then as "user0" the file "/drop/Mallory/folder/a (2).txt" exists
+ And Downloading file "/drop/Mallory/folder/a.txt"
+ Then Downloaded content should be "abc"
+ And Downloading file "/drop/Mallory/folder/a (2).txt"
+ Then Downloaded content should be "def"
+
+ Scenario: Files drop prevents GET
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | shareWith | |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ When Dropping file "/folder/a.txt" with "abc" as "Mallory"
+ When as "user0" the file "/drop/Mallory/folder/a.txt" exists
+ And Downloading public folder "Mallory"
Then the HTTP status code should be "405"
+ And Downloading public folder "Mallory/folder"
+ Then the HTTP status code should be "405"
+ And Downloading public file "Mallory/folder/a.txt"
+ Then the HTTP status code should be "405"
+
+ Scenario: Files drop requires nickname if file request is enabled
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder/a.txt" with "abc"
+ Then the HTTP status code should be "400"
+
+ Scenario: Files request drop with invalid nickname with slashes
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder/a.txt" with "abc" as "Alice/Bob/Mallory"
+ Then the HTTP status code should be "400"
+
+ Scenario: Files request drop with invalid nickname with forbidden characters
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder/a.txt" with "abc" as ".htaccess"
+ Then the HTTP status code should be "400"
+
+ Scenario: Files request drop with invalid nickname with forbidden characters
+ Given user "user0" exists
+ And As an "user0"
+ And user "user0" created a folder "/drop"
+ And as "user0" creating a share with
+ | path | drop |
+ | shareType | 4 |
+ | permissions | 4 |
+ | attributes | [{"scope":"fileRequest","key":"enabled","value":true}] |
+ | shareWith | |
+ When Dropping file "/folder/a.txt" with "abc" as ".Mallory"
+ Then the HTTP status code should be "400"