mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-30 07:49:41 -05:00
[tests-only][full-ci]added scenario for overwrite file with virus content in a public link (#6586) (#6600)
* added scenario for overwrite file with virus content in a public link * changed sharer overwrite step with public overwrite Co-authored-by: Karun Atreya <33852651+KarunAtreya@users.noreply.github.com>
This commit is contained in:
@@ -368,3 +368,43 @@ Feature: antivirus
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
|
||||
Scenario Outline: try to overwrite a file with the virus content in group share
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And group "group1" has been created
|
||||
And user "Brian" has been added to group "group1"
|
||||
And user "Alice" has been added to group "group1"
|
||||
And user "Alice" has uploaded file with content "hello" to "/test.txt"
|
||||
And user "Alice" has shared file "test.txt" with group "group1"
|
||||
And user "Brian" has accepted share "/test.txt" offered by user "Alice"
|
||||
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "test.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And user "Brian" should get a notification with subject "Virus found" and message:
|
||||
| message |
|
||||
| Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||
And the content of file "/test.txt" for user "Alice" should be "hello"
|
||||
And the content of file "Shares/test.txt" for user "Brian" should be "hello"
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
|
||||
|
||||
Scenario: try to overwrite a file with the virus content in group share using spaces dav endpoint
|
||||
Given using spaces DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And group "group1" has been created
|
||||
And user "Brian" has been added to group "group1"
|
||||
And user "Alice" has been added to group "group1"
|
||||
And user "Alice" has uploaded file with content "hello" to "/test.txt"
|
||||
And user "Alice" has shared file "test.txt" with group "group1"
|
||||
And user "Brian" has accepted share "/test.txt" offered by user "Alice"
|
||||
When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "/test.txt" in space "Shares" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And user "Brian" should get a notification with subject "Virus found" and message:
|
||||
| message |
|
||||
| Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||
And for user "Brian" the content of the file "/test.txt" of the space "Shares" should be "hello"
|
||||
And the content of file "/test.txt" for user "Alice" should be "hello"
|
||||
|
||||
Reference in New Issue
Block a user