Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only]Add bug demonstration test for sending PUT request to other user's webdav endpoint #39598

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/acceptance/features/apiAuthWebDav/webDavPUTAuth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: get file info using PUT
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@issue-ocis-reva-9 @issue-ocis-reva-197 @skipOnOcV10.3 @skipOnOcV10.4 @skipOnOcV10.5
@skipOnOcV10
Scenario: send PUT requests to another user's webDav endpoints as normal user
When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice"
| endpoint |
Expand All @@ -46,7 +46,8 @@ Feature: get file info using PUT
When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "409"
Then the HTTP status code of responses on all endpoints should be "403"


Scenario: send PUT requests to webDav endpoints using invalid username but correct password
When user "usero" requests these endpoints with "PUT" including body "doesnotmatter" using the password of user "Alice"
Expand All @@ -58,6 +59,7 @@ Feature: get file info using PUT
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"


Scenario: send PUT requests to webDav endpoints using valid password and username of different user
When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" using the password of user "Alice"
| endpoint |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@api @issue-39597 @skipOnOcV10.3 @skipOnOcV10.4 @skipOnOcV10.5 @skipOnOcis
Feature: get file info using PUT

Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"


Scenario: send PUT requests to another user's webDav endpoints as normal user
When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/dav/files/%username%/textfile1.txt |
| /remote.php/dav/files/%username%/PARENT |
Then the HTTP status code of responses on all endpoints should be "403"
When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice"
| endpoint |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "409"