Owncloud connector: No document history when editing if encryption is enabled?

Hi,

I posted this a couple weeks ago on github issues for owncloud-connector (#396), but since I had no reply, I’ll try here :wink:

We want to use OnlyOffice with our owncloud. We’re considering the paid version (for the number of concurrent sessions mostly), but before buying, we’re testing the community version.

On our setup (see at the end for versions), when encryption is enabled in owncloud (using Master Key), editing a document works but there is no history: The last revision is always overwritten by onlyoffice (be it a result from an upload or edits in onlyoffice).

So I get new versions of the file if I upload new versions directly on owncloud, but if it’s edited with onlyoffice, the last revision is replaced when it’s saved.

It works as intended when disabling encryption.

Is this expected behaviour? I didn’t find any statement on such a limitation when encryption is enabled, be it in the onlyoffice or owncloud doc.

I could reproduce it on a proof of concept install, but since I was using the same configuration (I was testing an upgrade), it could be a configuration issue: if so I’d welcome pointers.

If this is a known issue, or if it is by design, it would be nice to have it documented somewhere :wink:

Thanks!

Owncloud version: 10.11.0.6
Encryption method: Master Key
OnlyOffice Document server version: 7.2.2-56 Community Edition (using Debian packages)
OnlyOffice Owncloud connector: v7.6.7 (installed from owncloud App Market)

System: Debian 11 - php7.4 (from sury.org repo).

Hello @Clement,

We were not aware of this issue, thank you for detecting it. We are currently analyzing it and I will inform you about the results. Sorry for this inconvenience.

1 Like

Hello @Clement,
Upon further analysis of the issue we have found out that after enabling the master key encryption, the Versions app in ownCloud stops writing new versions. Versions are managed by this app and we interact with it to display document history in the editors, and since there are no new versions created, all further revisions of the file are written in one version.

Hello @Carl , thanks for testing. I have no issues with versions in owncloud itself. If I upload a new version of the file, it shows in the version history info of the file (and in onlyoffice too).

But there is no new version when a file is edited using onlyoffice - unless I disable encryption: onlyoffice writes to the last version in history and replaces it.

FYI, I did have an issue on my test installation with versions after re-enabling encryption. I was able to get the versioning back by uninstalling the app manually, removing the entries from oc_appconfig and restore it from the tarball (with a occ upgrade afterwards). But it never works when editing in onlyoffice if encryption is enabled.

Hello Clement,
Could you please record a video where this is demonstrated?

If I upload a new version of the file, it shows in the version history info of the file (and in onlyoffice too).

I look forward to your reply.

Hello Carl,

Here you go, I recorded a video showing the history in OwnCloud. You can see revisions work when there are done externally (uploading a file edited on the computer), but whenever it’s edited in OnlyOffice, no new revision is created: the last revision is overwritten. External revisions are visible in OnlyOffice, though.
I couldn’t upload the video here (only images allowed), so please find it here: https://drive.google.com/file/d/1P-LsLv1b4SdoznqnmD4eL5Dg2tuHP8AB/view?usp=sharing

Thanks!

Clément

Hello Clement,
Sorry, I should have made myself clearer. We’d like to see a video of how you upload the file versions externally so they are displayed in the version history with master key encryption enabled.

Well, it’s in the video… I just download the document, edit it in libreoffice, upload it again selecting “keep new” so it replace the existing one. The previous version of the file is visible in owncloud and onlyoffice in the history.

Or maybe I didn’t get what you mean ?

Hello @Clement
I would like to be involved in this task.
Thank you for the videofile, but we need extended version of video. Please record a new one and show us the Encryption tab on your portal, after that please show us two scenarios:

  1. Reproduce the issue with disabled Encryption
  2. Reproduce the issue with enabled Encription.

We’re looking forward to your reply.

Hi Alexandre,

I can do that, but it will take a while. Even on the test instance we have a lot of data (for testing purposes), and enabling or disabling encryption involves encrypting or decrypting all.

I’ll try to make a new one soonish. If you just need screenshots and instructions to reproduce, I can give that faster, though.

Thanks!

In general, we need a video file where you show Encryption tab on your ownCloud portal and then you are reproducing entire scenario from scratch. I hope it will be enough to continue troubleshooting.

Hi,

It took a while but I found the time to create a fresh install in vagrant and record 2 new videos, showing the encryption settings beforehand.
Here is the share: OnlyOffice share - Google Drive

Thanks for your help!

Thank you! We’re looking into them.
We will update this thread when we have something to share.

1 Like

We’ve checked out provided files.
The described behavior in this thread is expected one. The editor uses data which are provided by ownCloud. So in this scenario, when you have uploaded the file to the storage, ownCloud created new version. In its turn the editor uses the data provided by ownCloud to show versions.

I’m not sure I get it.

The expected behaviour is indeed to create new versions.

My issue is that if encryption if enabled, new versions only happen when the file is modified outside of onlyoffice, and onlyoffice modifies the last version, without any history. When encryption is disabled, onlyoffice correctly create new versions on modification, which is the desirable behavior. The fact that there is no versioning in onlyoffice when encryption is enabled is like removing the version history feature in our case, since we need encryption.

So we have to choose between either versioning or encryption ? As I posted initially, it would be nice to have it at least documented if it’s normal behaviour (sadly, that removes one of the most useful feature of OO Docs).

Thanks

My issue is that if encryption if enabled, new versions only happen when the file is modified outside of onlyoffice, and onlyoffice modifies the last version, without any history.

The point is that Document server doesn’t create new versions of a file in this scenario. When encryption is enabled on the ownCloud side, ownCloud provides information about versions to the editor. In this scenario the editor only shows available versions of the file.

Thanks for the explanation. Is there any chance this limitation will go away in a future release? That is, can the connector tell owncloud to create a new version instead of modifying the current one?

I don’t think this should happen. In the integration scenario the connector app is a ‘bridge’. It’s communication way between both sides (Document server and a storage, ownCloud in your case). The ownCloud sends information about file versions > connector app provides it to Document server > the editor displays versions of the file. So, the editor uses the information which was obtained from storage side.

So the issue would be on Owncloud side ? I can open an issue there.

I noticed force save has been removed when encryption is enabled in the latest release of OnlyOffice, but I don’t see anything that would explain why using the file owncloud app (external upload) would allow versioning to work, and not the “save” operation from OnlyOffice.

I shouldn’t call it the ‘issue’. It looks like expected behavior (the editor displays versions of file which were provided by ownCloud). But surely you can contact ownCloud team to discuss the situation.

As for forcesave feature, it was disabled on connector app version due to technical issue. We have information about this decision here: Releases · ONLYOFFICE/onlyoffice-owncloud · GitHub