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

fix(public-share-auth): allow to create new documents in public share folder #8828

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Apr 10, 2024

The public share authentication middleware only allowed to open existing documents the /app/new route was missing.

Fixes #8691

Copy link

update-docs bot commented Apr 10, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@dragonchaser
Copy link
Member

dragonchaser commented Apr 11, 2024

Fixes it for regular shares. In spaces it removes the 401 (so files can be created), but still ends up with a 500 when the file is being opened (independently from whether it has just been created or opening an existing odt file).

ocis-1                         | {"level":"error","service":"gateway","pkg":"rgrpc","traceid":"426d3963ed3f561af296b82d612035a2","user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0","from":"tcp://172.20.0.3:36272","uri":"/cs3.gateway.v1beta1.GatewayAPI/OpenInApp","start":"11/Apr/2024:09:20:49 +0000","end":"11/Apr/2024:09:20:49 +0000","time_ns":24474198,"code":"PermissionDenied","time":"2024-04-11T09:20:49Z","line":"github.com/cs3org/reva/[email protected]/internal/grpc/interceptors/log/log.go:69","message":"gateway: error calling OpenInApp: rpc error: code = PermissionDenied desc = auth: core access token is invalid"}
ocis-1                         | {"level":"error","service":"frontend","pkg":"rhttp","traceid":"7f10ea494e9ecc5ba2fa608839997e4b","request-id":"0c1f2555-f55c-48fd-99ec-445fc68463cd","error":"rpc error: code = PermissionDenied desc = gateway: error calling OpenInApp: rpc error: code = PermissionDenied desc = auth: core access token is invalid","time":"2024-04-11T09:20:49Z","line":"github.com/cs3org/reva/[email protected]/internal/http/services/appprovider/errors.go:63","message":"Error contacting the requested application, please use a different one or try again later"}
ocis-1                         | {"level":"error","service":"frontend","pkg":"rhttp","traceid":"7f10ea494e9ecc5ba2fa608839997e4b","host":"127.0.0.1","method":"POST","uri":"/app/open?file_id=9f49bd98-b3d2-4331-8950-764d1b358832%248021048c-7d23-4e34-85a8-e223038d40f3%21697c57ff-8a46-40cd-a96e-577681244bef&lang=en&app_name=Collabora&view_mode=write","url":"/open?file_id=9f49bd98-b3d2-4331-8950-764d1b358832%248021048c-7d23-4e34-85a8-e223038d40f3%21697c57ff-8a46-40cd-a96e-577681244bef&lang=en&app_name=Collabora&view_mode=write","proto":"HTTP/1.1","status":500,"size":134,"start":"11/Apr/2024:09:20:49 +0000","end":"11/Apr/2024:09:20:49 +0000","time_ns":30670724,"time":"2024-04-11T09:20:49Z","line":"github.com/cs3org/reva/[email protected]/internal/http/interceptors/log/log.go:112","message":"http"}

@rhafer
Copy link
Contributor Author

rhafer commented Apr 12, 2024

@dragonchaser Hm, I can't reproduce that. I can open and create new office documents anywhere. (Works with space, public links and user shares)

@rhafer
Copy link
Contributor Author

rhafer commented Apr 12, 2024

@dragonchaser nevermind. I think I found a way to reproduce the 500 error. It only happens if you share the space root via a link. I only try sharing folder within a space.

But I really think that is yet another bug. Should probably address with a separate PR.

… folder

The public share authentication middleware only allowed to open existing documents
the /app/new route was missing.

Fixes owncloud#8691
@rhafer rhafer marked this pull request as ready for review April 12, 2024 13:23
Copy link

sonarcloud bot commented Apr 12, 2024

@rhafer rhafer merged commit 8d5a0c6 into owncloud:master Apr 15, 2024
4 checks passed
@micbar micbar mentioned this pull request Jun 19, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to create a file with Collabora in a Space accessed via an edit public link
3 participants