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

Previews via share jail are broken #3596

Closed
kulmann opened this issue Apr 27, 2022 · 2 comments
Closed

Previews via share jail are broken #3596

kulmann opened this issue Apr 27, 2022 · 2 comments
Labels

Comments

@kulmann
Copy link
Contributor

kulmann commented Apr 27, 2022

Describe the bug

Trying to fetch the preview of an image via share jail tries to stat with a wrong path.

Steps to reproduce

Steps to reproduce the behavior:

  1. Make a GET request for a preview via share jail, real live example request: https://localhost:9200/remote.php/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668!69b72b1a-5496-4466-9790-dd49423deca7/asdf/one-file/Okapi.jpg?scalingup=0&preview=1&a=1&c=48c300389edb6df360bdcd853fb50092&x=36&y=36

OR

  1. set up ocis with [full-ci] Sharing jail web#6593 as web assets
  2. as admin: create a folder, put a single image into it, share the folder with einstein
  3. as einstein: accept the share and navigate into it

Expected behavior

Preview gets loaded.

Actual behavior

Preview request fails with an http 500 error

Setup

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

OCIS_VERSION=2ac2680e68e05e81a584328a799406bd10361a22
BRANCH=master

Additional context

The example request from above gives the following error log:

2022-04-27T12:27:21+02:00 ERR could not stat file path=a0ca6a90-a365-4782-871e-d44447bbc668!69b72b1a-5496-4466-9790-dd49423deca7!/asdf/one-file/Okapi.jpg service=thumbnails status_message="sharesstorageprovider: can only handle relative references"
2022-04-27T12:27:21+02:00 ERR could not stat file path=a0ca6a90-a365-4782-871e-d44447bbc668!69b72b1a-5496-4466-9790-dd49423deca7!/asdf/one-file/Okapi.jpg service=thumbnails status_message="sharesstorageprovider: can only handle relative references"
2022-04-27T12:27:21+02:00 ERR could not get thumbnail error="{\"id\":\"com.owncloud.api.thumbnails\",\"code\":500,\"detail\":\"could not stat file: sharesstorageprovider: can only handle relative references\",\"status\":\"Internal Server Error\"}" service=webdav

Please note that there is a trailing ! after the share id. That ! doesn't belong there (thanks to @micbar for noticing it). It doesn't exist in the request so there seems to be a faulty path construction somewhere in reva...

@C0rby
Copy link
Contributor

C0rby commented May 3, 2022

It should be fixed with this PR: #3648

@kulmann
Copy link
Contributor Author

kulmann commented May 6, 2022

Can confirm the fix 🥳

@kulmann kulmann closed this as completed May 6, 2022
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