ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.76k stars 1.08k forks source link

WOPI: Access token empty in CheckFileInfo request #1889

Closed hristianita closed 2 years ago

hristianita commented 2 years ago

Hello,

I am encountering a problem which might be a bug in the newly implemented OnlyOffice WOPI functionality.

We have implemented our own WOPI host. We run WOPI discovery successfuly and open a web page with an iframe to display the document. This is done similarly to your example test page (which works on its own). In the URL we use on this page, we pass the access token as a query parameter, as required. The problem is that the access token is not sent to our WOPI host in subsequent requests

In the attached picture of a log, it can be seen that in the initial request to OnlyOffice, ,we have added the access token as a query parameter and this is recognized by OnlyOffice. However, OnlyOffice then issues to me a CheckFileInfo request with an empty access token (="").

As a result, our WOPI host returns 401 Unauthorized to this request and the loading of the file fails.

https://drive.google.com/file/d/1GYJpZhYpZl4qqJRRXJxS_1kA-PaYbF5H/view?usp=sharing

Could you please tell us why this is happening? Isn't the WOPI client supposed to use the same access token provide at the start?

DocumentServer version: 7.1.1

Operating System: OnlyOffice installed in Docker container, the browser and our application run on Windows 10

Browser version: Google Chrome

Thank you

igwyd commented 2 years ago

Hello @hristianita, i checked the integration of our editors with the owncloud, we sending an access token as you see. I think the problem is in the settings of your wopi host. Сheck out our site about wopi integration, maybe you missed something? https://api.onlyoffice.com/editors/wopi/ log

hristianita commented 2 years ago

Hello, Thank you for your reply. I found the issue - I was passing the access token as a qery parameter rather than in the body of the request. Now it works. Thank you!

ShockwaveNN commented 2 years ago

I'll close this issue if it resolved