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

Failed to write to document errors in readonly sessions #5223

Closed
mejo- opened this issue Jan 10, 2024 · 2 comments · Fixed by #5466
Closed

Failed to write to document errors in readonly sessions #5223

mejo- opened this issue Jan 10, 2024 · 2 comments · Fixed by #5466
Labels
bug Something isn't working

Comments

@mejo-
Copy link
Member

mejo- commented Jan 10, 2024

Describe the bug
When opening Text documents in read-only mode (e.g. shared documents), Text regularly tries to send push messages to the backend that get declined:

POST https://nextcloud.local/index.php/apps/text/public/session/17142/push [HTTP/2 403  66ms]
[ERROR] text: failed to write to document - not allowed
[ERROR] text: Unexpected Error "Failed to apply steps. Retry!" 

To Reproduce
Steps to reproduce the behavior:

  1. Open Text document in read-only view (e.g. by sharing the document read-only)
  2. Open the developer console
  3. Maybe you have to click around in the document, not sure about that.
  4. See error

Screenshots
2024-01-10T12:13:11,375500483+01:00

Server details:

  • Nextcloud version: development branch (29.0.0 dev)
@mejo- mejo- added the bug Something isn't working label Jan 10, 2024
@juliusknorr
Copy link
Member

Not sure what is best but I think we have a few options:

  • Do not send out awareness messages on the client side
  • Accept read only users awareness messages on the push endpoint (even with read only)
    • Either ignore any pushed messages
    • Or filter out and only allow pushing awareness messages

@mejo-
Copy link
Member Author

mejo- commented Mar 11, 2024

I don't think we should send awareness messages on a connection that got initiated as read-only (e.g. due to missing write privileges).

My understanding is that we currently don't differentiate between "on purpose read-only" (e.g. when connecting to a document session without write privileges) and "temporary read-only" (e.g due to connectivity issues). In the former case I think we should stop the client from sending any awareness messages. In the latter case we should keep the current logic of throwing an error and retrying later.

mejo- added a commit that referenced this issue Mar 12, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 12, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 12, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 12, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 12, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
backportbot bot pushed a commit that referenced this issue Mar 13, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
backportbot bot pushed a commit that referenced this issue Mar 13, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 13, 2024
This fixes read-only clients getting 403 responses on push requests that
only contain questions for updates.

Fixes: #5223
Fixes: #5366
Fixes: #5368

Signed-off-by: Jonas <jonas@freesources.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants