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

Cannot open file png on public link #2866

Closed
Tracked by #2845
ScharfViktor opened this issue Dec 10, 2021 · 3 comments
Closed
Tracked by #2845

Cannot open file png on public link #2866

ScharfViktor opened this issue Dec 10, 2021 · 3 comments
Labels
OCIS-Fastlane Planned outside of the sprint Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug

Comments

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Dec 10, 2021

Describe the bug

Steps to reproduce the behavior:

  1. add a png file and open it in mediaviewer (opened correctly)
  2. create public link and open public link
  3. open png file in mediaviewer

Expected behavior

The pnd file can be opened in mediaviewer

Actual behavior

Error 500
2021-12-10T14:07:21+01:00 ERR could not get thumbnail error="{\"id\":\"com.owncloud.api.thumbnails\",\"code\":500,\"detail\":\"could not get image from source: could not get the image \\\"https://127.0.0.1:9200/remote.php/dav/public-files/VBWKXTWsWiWyuNo/amoadklbbpmdaabc.png/amoadklbbpmdaabc.png\\\". Request returned with statuscode 403 \",\"status\":\"Internal Server Error\"}" service=webdav

BUT: If you create a public link to a folder with a file, it works correctly

Setup

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

OCIS_VERSION=v1.16.0
BRANCH=v1.16.0-rc2
@ScharfViktor ScharfViktor added OCIS-Fastlane Planned outside of the sprint Type:Bug Priority:p3-medium Normal priority labels Dec 10, 2021
@micbar micbar added Priority:p2-high Escalation, on top of current planning, release blocker and removed Priority:p3-medium Normal priority labels Dec 14, 2021
@C0rby
Copy link
Contributor

C0rby commented Dec 16, 2021

I tested it with the 1.16 release and it works. Could you try again?

@dschmidt
Copy link
Member

dschmidt commented Jan 21, 2022

I might have more information on this. I noticed the same - at first it seemed random, but by now I think it might be dependent on the resolution:

curl 'https://host.docker.internal:9200/remote.php/dav/public-files/JzdwNgPegOTMRqk/San%20Francisco.jpg?a=1&c=cb90522b716442a97b13a090e757e3ab&preview=1&scalingup=0&x=1280&y=1280&signature=d7eb048024714ea0a95695bc23bdec5c96f483845f511548a78248dfdfc4f25e&expiration=2022-01-21T22%3A28%3A46Z' \
  -H 'Connection: keep-alive' \
  -H 'Pragma: no-cache' \
  -H 'Cache-Control: no-cache' \
  -H 'sec-ch-ua: "Chromium";v="95", ";Not A Brand";v="99"' \
  -H 'authorization: Bearer' \
  -H 'x-requested-with: XMLHttpRequest' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'Accept: */*' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: https://host.docker.internal:9200/' \
  -H 'Accept-Language: en,en-US;q=0.9,de;q=0.8,nl;q=0.7' \
  -H 'Cookie: oc_sessionPassphrase=fqweHxd%2BdJg8FP3OxHe4xPvw1COHodX4OkALnkVzp49oss3TD1uAmn97iKEH36eMe2WJFzUgM40bBG%2Be5StNAXQ02Cckve1pTcL8FGt2Vwg32rvdjdrRGvM0H%2FCshtBX; ocrdljgzi4vx=vnt05ac8qc3hniqolfdnronot9; ocjoxjzcyrm1=7sjkvp4er8rthns96d66vagikn' \
  --compressed \
  --insecure
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns"><s:exception></s:exception><s:message>{&#34;id&#34;:&#34;com.owncloud.api.thumbnails&#34;,&#34;code&#34;:500,&#34;detail&#34;:&#34;could not get image from source: could not get the image \&#34;https://host.docker.internal:9200/remote.php/dav/public-files/JzdwNgPegOTMRqk/San%20Francisco.jpg\&#34;. Request returned with statuscode 401 &#34;,&#34;status&#34;:&#34;Internal Server Error&#34;}</s:message></d:error>%                                                                                                                                                                                                                                                                                                                                                                                                              


% curl 'https://host.docker.internal:9200/remote.php/dav/public-files/JzdwNgPegOTMRqk/San%20Francisco.jpg?a=1&c=cb90522b716442a97b13a090e757e3ab&preview=1&scalingup=0&x=3840&y=3840&signature=d7eb048024714ea0a95695bc23bdec5c96f483845f511548a78248dfdfc4f25e&expiration=2022-01-21T22%3A28%3A46Z' \
  -H 'Connection: keep-alive' \
  -H 'Pragma: no-cache' \
  -H 'Cache-Control: no-cache' \
  -H 'sec-ch-ua: "Chromium";v="95", ";Not A Brand";v="99"' \
  -H 'authorization: Bearer' \
  -H 'x-requested-with: XMLHttpRequest' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'Accept: */*' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: https://host.docker.internal:9200/' \
  -H 'Accept-Language: en,en-US;q=0.9,de;q=0.8,nl;q=0.7' \
  -H 'Cookie: oc_sessionPassphrase=fqweHxd%2BdJg8FP3OxHe4xPvw1COHodX4OkALnkVzp49oss3TD1uAmn97iKEH36eMe2WJFzUgM40bBG%2Be5StNAXQ02Cckve1pTcL8FGt2Vwg32rvdjdrRGvM0H%2FCshtBX; ocrdljgzi4vx=vnt05ac8qc3hniqolfdnronot9; ocjoxjzcyrm1=7sjkvp4er8rthns96d66vagikn' \
  --compressed \
  --insecure
Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.

Right now I can reproduce 100% of the times. The only difference in those requests is x=1280&y=1280 vs x=3840&y=3840.

edit:
Hmm.. In my output I see error 401 and in the original report it mentions something with 403. So not sure this is the same issue, but who knows - maybe it still helps

@micbar
Copy link
Contributor

micbar commented May 10, 2022

Fixed in 2.0.0-beta1

@micbar micbar closed this as completed May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCIS-Fastlane Planned outside of the sprint Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Projects
None yet
Development

No branches or pull requests

4 participants