Removed core bug demonstration scenarios

This commit is contained in:
Prarup Gurung
2023-02-01 16:14:06 +05:45
parent 486453b4c9
commit 3f2e1ce516
27 changed files with 25 additions and 763 deletions
@@ -9,20 +9,20 @@ Feature: users cannot upload a file to a blacklisted name using old chunking
And using old DAV path
And user "Alice" has been created with default attributes and without skeleton files
@skipOnOcV10 @issue-36645 @notToImplementOnOCIS
@notToImplementOnOCIS
Scenario: Upload a file to a filename that is banned by default using old chunking
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/.htaccess" in 3 chunks using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file ".htaccess" should not exist
@skipOnOcV10 @issue-36645
Scenario: Upload a file to a banned filename using old chunking
Given the administrator has updated system config key "blacklisted_files" with value '["blacklisted-file.txt",".htaccess"]' and type "json"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "blacklisted-file.txt" in 3 chunks using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "blacklisted-file.txt" should not exist
@skipOnOcV10 @issue-36645
Scenario Outline: upload a file to a filename that matches blacklisted_files_regex using old chunking
# Note: we have to write JSON for the value, and to get a backslash in the double-quotes we have to escape it
# The actual regular expressions end up being .*\.ext$ and ^bannedfilename\..+
@@ -1,39 +0,0 @@
@notToImplementOnOCIS @api @issue-ocis-reva-15
Feature: users cannot upload a file to a blacklisted name using old chunking
As an administrator
I want to be able to prevent users from uploading files to specified file names
So that I can prevent unwanted file names existing in the cloud storage
Background:
Given using OCS API version "1"
And using old DAV path
And user "Alice" has been created with default attributes and without skeleton files
@issue-36645
Scenario: Upload a file to a filename that is banned by default using old chunking
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/.htaccess" in 3 chunks using the WebDAV API
Then the HTTP status code should be "507"
# Then the HTTP status code should be "403"
And as "Alice" file ".htaccess" should not exist
@issue-36645
Scenario: Upload a file to a banned filename using old chunking
Given the administrator has updated system config key "blacklisted_files" with value '["blacklisted-file.txt",".htaccess"]' and type "json"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "blacklisted-file.txt" in 3 chunks using the WebDAV API
Then the HTTP status code should be "507"
# Then the HTTP status code should be "403"
And as "Alice" file "blacklisted-file.txt" should not exist
@issue-36645
Scenario Outline: upload a file to a filename that matches blacklisted_files_regex using old chunking
# Note: we have to write JSON for the value, and to get a backslash in the double-quotes we have to escape it
# The actual regular expressions end up being .*\.ext$ and ^bannedfilename\..+
Given the administrator has updated system config key "blacklisted_files_regex" with value '[".*\\.ext$","^bannedfilename\\..+","containsbannedstring"]' and type "json"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "<filename>" in 3 chunks using the WebDAV API
Then the HTTP status code should be "<http-status>"
And as "Alice" file "<filename>" should not exist
Examples:
| filename | http-status | comment |
| filename.ext | 507 | issue-36645 |
| bannedfilename.txt | 403 | ok |
| this-ContainsBannedString.txt | 403 | ok |
@@ -9,14 +9,14 @@ Feature: users cannot upload a file to or into an excluded directory using old c
And using old DAV path
And user "Alice" has been created with default attributes and without skeleton files
@skipOnOcV10 @issue-36645
Scenario: Upload a file to an excluded directory name using old chunking
Given the administrator has updated system config key "excluded_directories" with value '[".github"]' and type "json"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/.github" in 3 chunks using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file ".github" should not exist
@skipOnOcV10 @issue-36645
Scenario: Upload a file to an excluded directory name inside a parent directory using old chunking
Given user "Alice" has created folder "FOLDER"
And the administrator has updated system config key "excluded_directories" with value '[".github"]' and type "json"
@@ -25,7 +25,7 @@ Feature: users cannot upload a file to or into an excluded directory using old c
And as "Alice" folder "/FOLDER" should exist
But as "Alice" file "/FOLDER/.github" should not exist
@skipOnOcV10 @issue-36645
Scenario Outline: upload a file to a filename that matches excluded_directories_regex using old chunking
# Note: we have to write JSON for the value, and to get a backslash in the double-quotes we have to escape it
# The actual regular expressions end up being endswith\.bad$ and ^\.git
@@ -1,42 +0,0 @@
@notToImplementOnOCIS @api @issue-ocis-reva-15
Feature: users cannot upload a file to or into an excluded directory using old chunking
As an administrator
I want to be able to exclude directories (folders) from being processed. Any attempt to upload a file to one of those names should be refused.
So that I can have directories on my cloud server storage that are not available for syncing.
Background:
Given using OCS API version "1"
And using old DAV path
And user "Alice" has been created with default attributes and without skeleton files
@issue-36645
Scenario: Upload a file to an excluded directory name using old chunking
Given the administrator has updated system config key "excluded_directories" with value '[".github"]' and type "json"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/.github" in 3 chunks using the WebDAV API
Then the HTTP status code should be "507"
# Then the HTTP status code should be "403"
And as "Alice" file ".github" should not exist
@issue-36645
Scenario: Upload a file to an excluded directory name inside a parent directory using old chunking
Given user "Alice" has created folder "FOLDER"
And the administrator has updated system config key "excluded_directories" with value '[".github"]' and type "json"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/FOLDER/.github" in 3 chunks using the WebDAV API
Then the HTTP status code should be "507"
# Then the HTTP status code should be "403"
And as "Alice" folder "/FOLDER" should exist
But as "Alice" file "/FOLDER/.github" should not exist
@issue-36645
Scenario Outline: upload a file to a filename that matches excluded_directories_regex using old chunking
# Note: we have to write JSON for the value, and to get a backslash in the double-quotes we have to escape it
# The actual regular expressions end up being endswith\.bad$ and ^\.git
Given the administrator has updated system config key "excluded_directories_regex" with value '["endswith\\.bad$","^\\.git","containsvirusinthename"]' and type "json"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "<filename>" in 3 chunks using the WebDAV API
Then the HTTP status code should be "<http-status>"
And as "Alice" file "<filename>" should not exist
Examples:
| filename | http-status | comment |
| thisendswith.bad | 507 | issue-36645 |
| .github | 403 | ok |
| this-containsvirusinthename.txt | 403 | ok |
@@ -8,7 +8,7 @@ Feature: upload file using old chunking
Given using OCS API version "1"
And user "Alice" has been created with default attributes and without skeleton files
@skipOnOcV10 @issue-36115
Scenario Outline: Upload chunked file asc
Given using <dav_version> DAV path
When user "Alice" uploads the following "3" chunks to "/myChunkedFile.txt" with old chunking and using the WebDAV API
@@ -162,7 +162,7 @@ Feature: upload file using old chunking
| spaces | @a#8a=b?c=d |
| spaces | ?abc=oc # |
@skipOnOcV10 @issue-36115
Scenario Outline: Upload chunked file with old chunking with lengthy filenames
Given using <dav_version> DAV path
Given the owncloud log level has been set to debug
@@ -1,43 +0,0 @@
@notToImplementOnOCIS @api @issue-ocis-reva-17
Feature: upload file using old chunking
As a user
I want to be able to upload "large" files in chunks
So that the upload can be completed in less elapsed time
@issue-36115
Scenario: Upload chunked file asc
Given using OCS API version "1"
And using old DAV path
And user "Alice" has been created with default attributes and without skeleton files
When user "Alice" uploads the following "3" chunks to "/myChunkedFile.txt" with old chunking and using the WebDAV API
| number | content |
| 1 | AAAAA |
| 2 | BBBBB |
| 3 | CCCCC |
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Alice"
| ETag | /^[a-f0-9:\.]{1,32}$/ |
# | ETag | /^"[a-f0-9:\.]{1,32}"$/ |
And as "Alice" file "/myChunkedFile.txt" should exist
And the content of file "/myChunkedFile.txt" for user "Alice" should be "AAAAABBBBBCCCCC"
Scenario: Upload chunked file with old chunking with lengthy filenames
Given using OCS API version "1"
And using old DAV path
And user "Alice" has been created with default attributes and without skeleton files
And the owncloud log level has been set to debug
And the owncloud log has been cleared
When user "Alice" uploads the following chunks to "ि-file--ि-file--ि-file--ि-file--ि-file--ि-file--12345678910.txt" with old chunking and using the WebDAV API
| number | content |
| 1 | AAAAAAAAAAAAAAAAAAAAAAAAA |
| 2 | BBBBBBBBBBBBBBBBBBBBBBBBB |
| 3 | CCCCCCCCCCCCCCCCCCCCCCCCC |
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Alice"
| ETag | /^[a-f0-9:\.]{1,32}$/ |
And as "Alice" file "ि-file--ि-file--ि-file--ि-file--ि-file--ि-file--12345678910.txt" should exist
And the content of file "ि-file--ि-file--ि-file--ि-file--ि-file--ि-file--12345678910.txt" for user "Alice" should be "AAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCC"
And the log file should not contain any log-entries containing these attributes:
| app |
| dav |