owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
429 stars 160 forks source link

Cannot download a document in onlyoffice from link share (editor role) with wopi v10 #10086

Closed saw-jan closed 9 months ago

saw-jan commented 9 months ago

Describe the bug

With wopiserver > v10, onlyoffice cannot download the file when accessing it from the link share that has Can edit permission.

Note: works with wopi v9

Steps to reproduce

  1. [Use docker-compose setup from web]
  2. Create a new Microsoft Word file -> opens in onlyoffice
  3. Add some content and save
  4. Create a link share of that file with Can edit permission
  5. Open the created link

Screenshot from 2023-11-29 16-48-44

Expected behavior

File content to be visible in onlyoffice editor

Actual behavior

Download failed error

Setup

Onlyoffice: 7.5.1 Wopi: > v10

saw-jan commented 9 months ago

I tried to upgrade the wopiserver but e2e test also fails (https://github.com/owncloud/web/pull/10077) build: https://drone.owncloud.com/owncloud/web/40751/13/20

Tracings:

npx playwright show-trace https://cache.owncloud.com/public/owncloud/web/40751/tracing/create-a-microsoft-word-file-with-only-office-alice-2023-11-30-05-06-49.zip 

npx playwright show-trace https://cache.owncloud.com/public/owncloud/web/40751/tracing/create-a-microsoft-word-file-with-only-office-anonymous-2023-11-30-05-07-08.zip
saw-jan commented 9 months ago

The issue was because of the old wopi config file. Updating to new config values works

-downloadurl = http://wopiserver:8880/wopi/cbox/download
+downloadurl = http://wopiserver:8880/wopi/iop/download

-# WOPI lock strict check: if True, WOPI locks will be compared according to specs,
-# that is their representation must match. False (default) allows for a more relaxed
-# comparison, which compensates incorrect lock requests from Microsoft Office Online
# on-premise setups.
-wopilockstrictcheck = False
+# WOPI lock strict check: if True (default), WOPI locks will be compared according to specs,
+# that is their representation must match. False allows for a more relaxed comparison,
+# which compensates incorrect lock requests from Microsoft Office Online 2016-2018
# on-premise setups.
+wopilockstrictcheck = True