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

Fix public stat and listcontainer response to contain the correct prefix #902

Merged
merged 1 commit into from
Jun 30, 2020
Merged

Fix public stat and listcontainer response to contain the correct prefix #902

merged 1 commit into from
Jun 30, 2020

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Jun 29, 2020

Fixes COPY operations on public links

For owncloud/ocis-reva#310

@butonic said that storage providers should not know about mount paths, but it seems this is currently technical debt / in discussion here: #578

so this PR is conforming to the current design.

  • TEST: COPY non-public file
% curl -u einstein:relativity -k -X COPY -H "Destination: https://localhost:9200/remote.php/dav/files/einstein/test-copyprivate.txt" -D - 'https://localhost:9200/remote.php/dav/files/einstein/md5.txt'

HTTP/1.1 201 Created
Access-Control-Allow-Origin: *
Content-Length: 0
Content-Security-Policy: default-src 'none';
Date: Mon, 29 Jun 2020 12:43:24 GMT
Vary: Origin
X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTkzNDM4MjA0LCJpYXQiOjE1OTM0MzQ2MDQsImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJ1c2VyIjp7ImlkIjp7ImlkcCI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJvcGFxdWVfaWQiOiJlaW5zdGVpbiJ9LCJ1c2VybmFtZSI6ImVpbnN0ZWluIiwibWFpbCI6ImVpbnN0ZWluQGV4YW1wbGUub3JnIiwiZGlzcGxheV9uYW1lIjoiRWluc3RlaW4ifX0.kwNpTnr5-H-9POVHVkKe6DPKCC_72ewhSVea2EmfREA
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-Xss-Protection: 1; mode=block
  • TEST: COPY non-public folder
% curl -u einstein:relativity -k -X COPY -H "Depth: infinity" -H "Destination: https://localhost:9200/remote.php/dav/files/einstein/copyprivate-folder" -D - 'https://localhost:9200/remote.php/dav/files/einstein/test'

HTTP/1.1 201 Created
Access-Control-Allow-Origin: *
Content-Length: 0
Content-Security-Policy: default-src 'none';
Date: Mon, 29 Jun 2020 12:44:36 GMT
Vary: Origin
X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTkzNDM4Mjc2LCJpYXQiOjE1OTM0MzQ2NzYsImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJ1c2VyIjp7ImlkIjp7ImlkcCI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJvcGFxdWVfaWQiOiJlaW5zdGVpbiJ9LCJ1c2VybmFtZSI6ImVpbnN0ZWluIiwibWFpbCI6ImVpbnN0ZWluQGV4YW1wbGUub3JnIiwiZGlzcGxheV9uYW1lIjoiRWluc3RlaW4ifX0.lOgrmRnoBNIyRmNyICKj2w9dL0xPhmcWHZ-FqbXZ1jk
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-Xss-Protection: 1; mode=block
  • TEST: COPY file within public folder
% curl -k -X COPY -H "Destination: https://localhost:9200/remote.php/dav/public-files/UbDkKrggmxpB/test-copy-file.txt" -D - 'https://localhost:9200/remote.php/dav/public-files/UbDkKrggmxpB/md5.txt'                                               
HTTP/1.1 201 Created
Access-Control-Allow-Origin: *
Content-Length: 0
Content-Security-Policy: default-src 'none';
Date: Mon, 29 Jun 2020 12:43:02 GMT
Vary: Origin
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-Xss-Protection: 1; mode=block
  • TEST: COPY folder within public folder
% curl -k -H "Depth: infinity" -X COPY -H "Destination: https://localhost:9200/remote.php/dav/public-files/UbDkKrggmxpB/test-folder-copy-test" -D - 'https://localhost:9200/remote.php/dav/public-files/UbDkKrggmxpB/test'
HTTP/1.1 201 Created
Access-Control-Allow-Origin: *
Content-Length: 0
Content-Security-Policy: default-src 'none';
Date: Mon, 29 Jun 2020 12:42:26 GMT
Vary: Origin
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-Xss-Protection: 1; mode=block
  • TEST: run related acceptance tests
    • PROPFIND as this might use listcontainer
    • existing COPY tests

@refs
Copy link
Member

refs commented Jun 29, 2020

thanks for formalizing this a little!

@refs refs merged commit 39a90d4 into cs3org:master Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants