Skip to content

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

Merged
kobergj merged 1 commit into
owncloud:stable-8.0from
kobergj:backport/OCISDEV-781-wopi-lock-read-only
Apr 27, 2026
Merged

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

Conversation

@kobergj

@kobergj kobergj commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

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
@mzner mzner self-requested a review April 27, 2026 06:43
@kobergj kobergj merged commit a984af2 into owncloud:stable-8.0 Apr 27, 2026
209 of 216 checks passed
@kobergj kobergj deleted the backport/OCISDEV-781-wopi-lock-read-only branch April 27, 2026 07:38
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.

3 participants