opencloud icon indicating copy to clipboard operation
opencloud copied to clipboard

Collabora cannot open a file shared via public link when the user is logged in

Open individual-it opened this issue 7 months ago • 3 comments

Initial Checklist

  • [x] I understand this is a bug report and questions should be posted in the Community Discussions
  • [x] I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

If the user is logged in and receives a public link of a collabora file, he cannot open it and only sees an error message

Reproduction Steps

  1. as user1 create a file with collabora
  2. create a public link of that file
  3. logout
  4. open the public link => all works well
  5. close the file
  6. login as user2
  7. open the public link

Expected Outcome

the file should be displayed in collabora

Actual Outcome

File is not opened Image

Browser logs: PROPFINDs to remote.php/dav/public-files/<linkId> & remote.php/dav/public-files/<linkId>/<fileName> do get a 207 response PROPFINDs to remote.php/dav/meta/<linkId> get a 404 response

then there is a POST to app/open?file_id=cb5747d0-a9b8-49f0-be2e-e9cce9e1178b%24ca4a3be8-6bbc-4818-995b-b695deaa1aac%2132e3b293-c31d-43fc-990d-6fdd5ee8158e&lang=en&app_name=CollaboraOnline&view_mode=read and that also receives a 404 with the content:

{
  "code": "RESOURCE_NOT_FOUND",
  "message": "file does not exist"
}

individual-it avatar May 27 '25 07:05 individual-it

The endpoint https://{host}/app/open?file_id={fileId} returns different responses based on the given Authorization header. When this header is missing, it returns the response as it should. But when the user is logged in and sends a bearer token, the server responds with a 404 error.

@rhafer Do you know the reason for this? Looks like a bug to me.

JammingBen avatar Aug 06 '25 11:08 JammingBen

Yeah, that certain looks like a bug. I'll move this to the backend repo...

rhafer avatar Aug 13 '25 14:08 rhafer

I checked again, the user-facing issue is fixed. So there is the server-issue left, but IMO this could be downgraded to a p3 since it doesn't affect the user.

@rhafer @micbar What do you think?

JammingBen avatar Nov 10 '25 09:11 JammingBen