-
Notifications
You must be signed in to change notification settings - Fork 182
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
Downloading the older version of shared file as share receiver gives 403
#3868
Comments
ownCloud Web UI 5.5.0-rc.8 I can't reproduce this on an actual master. 6 step gives me |
I can still reproduce it. But now it returns ocis/tests/acceptance/expected-failures-API-on-OCIS-storage.md Lines 36 to 38 in 0676828
The tests fails on CI as well : https://drone.owncloud.com/owncloud/ocis/12666/47/6 @skipOnOcV10.6 @skipOnOcV10.7 @skipOnOcV10.8.0
Scenario: download old versions of a shared file as share receiver # /srv/app/testrunner/tests/acceptance/features/apiVersions/fileVersionsSharingToShares.feature:306
Given user "Brian" has been created with default attributes and without skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
And user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
And user "Alice" has uploaded file with content "version 2" to "textfile0.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
And user "Alice" has shared file "textfile0.txt" with user "Brian" # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice" # FeatureContext::userHasReactedToShareOfferedBy()
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "1" # FilesVersionsContext::downloadVersion()
Then the HTTP status code should be "200" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
HTTP status code 403 is not the expected value 200
Failed asserting that 403 matches expected '200'.
And the following headers should be set # FeatureContext::theFollowingHeadersShouldBeSet()
| header | value |
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
And the downloaded content should be "version 1" # FeatureContext::downloadedContentShouldBe()
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "2" # FilesVersionsContext::downloadVersion()
Then the HTTP status code should be "200" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
And the following headers should be set # FeatureContext::theFollowingHeadersShouldBeSet()
| header | value |
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
And the downloaded content should be "uploaded content" # FeatureContext::downloadedContentShouldBe() |
404
404
404
403
I can also reproduce it, although I'm getting a
|
we are copying all extended attributes between versions and the code has these nice comments:
That means that new grants do not apply to old versions ... hmm ... we may not even have to copy metadata at all ... since I only use the version nodes to keep track of the blob id ... 🤔 would make the code a lot simpler ... 🤔 since I am rewriting the FinishUpload code in cs3org/reva#3473 already I can look into this ... |
fixed by cs3org/reva#3473 ... but needs a review and reva ci has some hiccups. |
Describe the bug
It is not possible to download the older version of a shared file
Steps to reproduce
Steps to reproduce the behavior:
Marie
create a filecurl -X PUT -vk -u marie:radioactivity https://localhost:9200/remote.php/dav/files/marie/test.txt -d"original"
curl -X PUT -vk -u marie:radioactivity https://localhost:9200/remote.php/dav/files/marie/test.txt -d"version 1"
einstein
and accept the sharecurl -X PROPFIND -vk -u einstein:relativity https://localhost:9200/remote.php/dav/files/einstein/Shares/test.txt | xmllint --format -
curl -X PROPFIND -vk -u einstein:relativity https://localhost:9200/remote.php/dav/meta/<fileid>/v | xmllint --format -
curl -X GET -vk -u einstein:relativity https://localhost:9200/<href>
Expected behavior
It should be possible to download the content of old version of the file
Actual behavior
Gives
404
status codeSetup
Current master
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: