Collabora cannot open a file shared via public link when the user is logged in
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
- as user1 create a file with collabora
- create a public link of that file
- logout
- open the public link => all works well
- close the file
- login as user2
- open the public link
Expected Outcome
the file should be displayed in collabora
Actual Outcome
File is not opened
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"
}
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.
Yeah, that certain looks like a bug. I'll move this to the backend repo...
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?