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

unable to create resource using TUS inside Shares dir with spaces webdav #3048

Open
kiranparajuli589 opened this issue Jan 28, 2022 · 2 comments
Labels

Comments

@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jan 28, 2022

Steps to reproduce

Steps to reproduce the behavior:

  1. create two users uu1 and uu2
  2. create a folder simple-folder using uu1
  3. share simple-folder with user uu2 using user uu1 with upload permissions
  4. uu2 accepts the incoming share
  5. uu2 tries to upload a file using the TUS protocol and spaces WebDAV api inside the received share dir

Expected behavior

  • file should be uploaded
  • sharer should see the uploaded file

Actual behavior

the POST request fails with status code 412:

POST /remote.php/dav/spaces/64ef9397-4f29-4c66-9821-9674a9392398 HTTP/1.1
Host: localhost:9200
Content-Length: 0
User-Agent: GuzzleHttp/7
Authorization: Basic QnJpYW46MTIzNA==
Upload-Length: 19
Upload-Metadata: filename L1NoYXJlcy90ZXh0RmlsZS50eHQ=
Tus-Resumable: 1.0.0
X-Request-ID: apiWebdavUploadTUS/uploadToShare.feature:341-328

HTTP/1.1 412 Precondition Failed
Access-Control-Allow-Headers: Tus-Resumable, Upload-Length, Upload-Metadata, If-Match
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Tus-Resumable, Location
Content-Length: 0
Content-Security-Policy: default-src 'none';
Date: Fri, 28 Jan 2022 07:22:20 GMT
Tus-Extension: creation,creation-with-upload,checksum,expiration
Tus-Resumable: 1.0.0
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

Setup

Please describe how you started the server and provide a list of relevant environment variables.

OCIS_VERSION=v1.16.0
BRANCH=latest master

Additional context

The behavior is reproduced at https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadToShare.feature#L341

@kiranparajuli589 kiranparajuli589 changed the title tus upload overwrite on shared file with new data and correct checksum fails with 412 unable to create resource using TUS inside Shares dir Jan 28, 2022
@individual-it
Copy link
Member

Is this only a problem when using spaces or also without spaces? That is not clear to me reading the description and the example

@kiranparajuli589 kiranparajuli589 changed the title unable to create resource using TUS inside Shares dir unable to create resource using TUS inside Shares dir with spaces webdav Jan 31, 2022
@kiranparajuli589
Copy link
Contributor Author

Is this only a problem when using spaces or also without spaces? That is not clear to me reading the description and the example

@individual-it I've updated the issue title/description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants