-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File locks are not respected by nextcloud office or for core actions (rename, move, delete) by the same user #228
Comments
Reproduction steps appear to be in forum post: https://help.nextcloud.com/t/nextcloud-28-0-2-ignores-file-locks-for-most-things-including-nextcloud-office/180844?u=jtr |
Are steps 8 & 9 also executed by User A? If so I think the core bug is 4/5/6 (because I believe the owner can always override their own locks under the assumption they know what they're doing due to #73, but that's just my initial cursory take). |
Yes, steps 8 and 9 are indeed executed by the owner. Thank you so much for this hint. As a result, I went and looked at what the locking does from other users' perspective. What I found is that any other user is indeed blocked from editing / moving / renaming when the file is locked. That is to say that User B of Nextcloud cannot edit a file locked by User A. This is great as it dramatically reduces the surface of this bug and narrows it down. As such, I understand the logic of the change: "Trust user A to make changes to a file locked by user A, but don't trust user B". Let's expand on this behaviour further: How does Libreoffice stop two opened copies of a document from being edited simultaneously? Using .~lock# files. In this case, because libreoffice is not both clients, Nextcloud Office does not know that libreoffice has opened the file, and so it allows user A to write over the file with no warning. With your hint, I further explored the edges of this bug, and if a document is opened by Nextcloud Office, it is locked and not writeable to the Nextcloud desktop client shares (using an ubuntu desktop). This appears to be because Nextcloud Office does not behave as user A, but as its own user (user C). I think the expected behaviour could be the following:
Because this is a relatively narrow case, I'm no longer sure when this behaviour entered NC. However, I do believe that it is dangerous behaviour anyhow as it is unexpected - if I lock a file, I'm expecting there to be no crashes in editing. Essentially, NC should mirror the behaviour of the MD editor in this sense. I'm going to rewrite the above description to reflect how much narrower the bug seems to be, and to include reproduction steps. Thank you! |
Hello,
I just upgraded to Nextcloud 28.0.2 from 26.x
File locking behaves unexpectedly and inconsistently with respect to actions by the user who did the file lock.
Steps to reproduce
Scenario 1: Correct behaviour while locking and editing MD files
Scenario 2: Unexpected behaviour while locking and editing NC Office files
Scenario 3: Expected behaviour when editing starts in NC Office
Scenario 3: Unexpected behaviour with file operations while file is locked.
In all cases, I see the icon and generate a file lock which does appear in the database table (oc_files_lock).
According to Zendesk's bug severity guidelines, this bug would be classified as "High" severity as the feature does not behave as expected and causes data loss in certain cases.
Any ideas on how best to proceed in terms of further debugging or resolving this bug?
Versions:
Collabora 23.05.8.4
NC 28.0.2
Files_lock 28.0.1
tarek : )
The text was updated successfully, but these errors were encountered: