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

Trying to get the preview of another user's file gives 500 error #1274

Closed
dpakach opened this issue Jun 29, 2020 · 3 comments
Closed

Trying to get the preview of another user's file gives 500 error #1274

dpakach opened this issue Jun 29, 2020 · 3 comments
Labels

Comments

@dpakach
Copy link
Contributor

dpakach commented Jun 29, 2020

steps to reproduce

  • create a user and upload a file
  • As a different user try to get the preview of the file

Expected

  • Give unauthorized error

Actual result

  • Returns 500 internal server error

Request and response

GET /remote.php/dav/files/Alice/parent.txt?x=32&y=32&forceIcon=0&preview=1 HTTP/1.1
Host: localhost:9140
User-Agent: GuzzleHttp/6.5.3 curl/7.68.0 PHP/7.4.3
Authorization: Basic QnJpYW46MTIzNA==

HTTP/1.1 500 Internal Server Error
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'none';
Vary: Origin
X-Access-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNTkzNDA5MTM3LCJpYXQiOjE1OTM0MDU1MzcsImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJ1c2VyIjp7ImlkIjp7ImlkcCI6Imh0dHBzOi8vbG9jYWxob3N0OjkyMDAiLCJvcGFxdWVfaWQiOiJCcmlhbiJ9LCJ1c2VybmFtZSI6IkJyaWFuIiwibWFpbCI6ImJyaWFuQGV4YW1wbGUub3JnIn19.sWIJ9I22BD_Qo7bfW3kt_v8hFCvagIYm0NLFdlMzaHI
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
Date: Mon, 29 Jun 2020 04:38:57 GMT
Content-Length: 0

server logs

ocis            | 2020-06-29T04:42:56Z INF eos cmd args="[/usr/bin/xrdcopy --nopbar --silent -f root://mgm-master.testnet:1094///eos/dockertest/reva/users/Alice/parent.txt /tmp/eosread-17b2c7b2-a713-4d66-bb7c-fcc9b9566a20 -OSeos.ruid=30001&eos.rgid=5000]" env=[EOS_MGM_URL=root://mgm-master.testnet:1094] exit=54 pkg=rhttp service=reva traceid=cc07e9fdf949e1e0eb2125b6652d6379
ocis            | 2020-06-29T04:42:56Z ERR datasvc: error downloading file error="eosclient: error while executing command: exit status 54" pkg=rhttp service=reva traceid=cc07e9fdf949e1e0eb2125b6652d6379
ocis            | 2020-06-29T04:42:56Z ERR http end="29/Jun/2020:04:42:56 +0000" host=127.0.0.1 method=GET pkg=rhttp proto=HTTP/1.1 service=reva size=0 start="29/Jun/2020:04:42:56 +0000" status=500 time_ns=21916586 traceid=cc07e9fdf949e1e0eb2125b6652d6379 uri=/data/Alice/parent.txt url=/data/Alice/parent.txt
ocis            | 2020-06-29T04:42:56Z ERR http end="29/Jun/2020:04:42:56 +0000" host=172.21.0.1 method=GET pkg=rhttp proto=HTTP/1.1 service=reva size=0 start="29/Jun/2020:04:42:56 +0000" status=500 time_ns=207316401 traceid=cc07e9fdf949e1e0eb2125b6652d6379 uri=/remote.php/dav/files/Alice/parent.txt?x=32&y=32&forceIcon=0&preview=1 url=/remote.php/dav/files/Alice/parent.txt?x=32&y=32&forceIcon=0&preview=1

@butonic
Copy link
Member

butonic commented Sep 16, 2020

cs3org/reva#1170 changes the response to a 200 ok. at least on an owncloud storage driver ...

@butonic
Copy link
Member

butonic commented Sep 16, 2020

see also owncloud/ocis-thumbnails#5

@butonic butonic transferred this issue from owncloud/ocis-reva Jan 18, 2021
@refs refs changed the title [EOS] trying to get the preview of another user's file gives 500 error Trying to get the preview of another user's file gives 500 error Jan 18, 2021
@settings settings bot removed the Storage:EOS label Jan 29, 2021
@settings settings bot removed the p3-medium label Apr 7, 2021
@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented May 25, 2021

The endpoint responds with:

> GET /remote.php/dav/files/admin/lorem.txt?a=1&c=c158956012c358dc9906e9f750c6fc8b&preview=1&scalingup=0&x=32&y=32 HTTP/1.1
> Host: localhost:9200
> Authorization: Basic dXUxOnV1MQ==
> User-Agent: curl/7.68.0
> Accept: */*
> 
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [146 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Access-Control-Allow-Origin: *
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value
< Content-Length: 228
< Content-Type: application/xml; charset=utf-8
< Date: Tue, 25 May 2021 12:25:52 GMT
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Last-Modified: Tue, 25 May 2021 12:25:52 GMT
< X-Content-Type-Options: nosniff
< X-Frame-Options: DENY
< X-Webdav-Version: 0.0.0
< X-Xss-Protection: 1; mode=block
< 
{ [228 bytes data]
100   228  100   228    0     0   1628      0 --:--:-- --:--:-- --:--:--  1640
* Connection #0 to host localhost left intact
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>File with name lorem.txt could not be located</s:message>
</d:error>

The error message is different than from oc10 backend. Reported at #2071

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

4 participants