Skip to content

fix(collaboration): [OCISDEV-781] return 200 OK for WOPI Lock in read-only modes#12262

Open
kobergj wants to merge 1 commit intoowncloud:stable-8.0from
kobergj:backport/OCISDEV-781-wopi-lock-read-only
Open

fix(collaboration): [OCISDEV-781] return 200 OK for WOPI Lock in read-only modes#12262
kobergj wants to merge 1 commit intoowncloud:stable-8.0from
kobergj:backport/OCISDEV-781-wopi-lock-read-only

Conversation

@kobergj
Copy link
Copy Markdown
Contributor

@kobergj kobergj commented Apr 24, 2026

Summary

Backport of #12257 to stable-8.0.

  • OnlyOffice sends a WOPI Lock request when opening any document, even when the user only has read access
  • The Lock handler was attempting a CS3 write lock regardless of view mode, causing a permission error that OnlyOffice displayed as an error dialog on load
  • Fix: return 200 OK immediately for READ_ONLY and VIEW_ONLY view modes without acquiring a lock

Test plan

  • Share a .docx file with a user as viewer
  • Open the file in OnlyOffice as that viewer
  • Verify no error dialog appears and the document loads in read-only mode

🤖 Generated with Claude Code

…-only modes

OnlyOffice sends a WOPI Lock request on document open regardless of whether
the user has write access. The Lock handler was calling SetLock with a
read-only CS3 token, which returned a permission error propagated as HTTP 500
to OnlyOffice, causing an error dialog on load.

Return 200 OK immediately for READ_ONLY and VIEW_ONLY view modes without
acquiring a CS3 lock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
@kobergj kobergj force-pushed the backport/OCISDEV-781-wopi-lock-read-only branch from 4395f20 to 39bb128 Compare April 24, 2026 13:39
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.

1 participant