-
Notifications
You must be signed in to change notification settings - Fork 671
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
Prevent multiple accounts from sharing a sync folder #8849
Comments
|
Tested with testpilotcloud-client-2.9.0-beta3 and owncloud-client 2.9.0-beta3 on Fedora-33
No error messages occur, both accounts on the server now have the same files and folders. admin's Photos folder appears at user demo. Demo's demo-Photos folder appars at user admin. Expected behaviour, sharing of sync root folders should not be possible when using VFS. However, when configuring the second account with the same client, sharing of the sync root folder is not possible, as expected. |
This should prevented in https://github.com/owncloud/client/blob/master/src/gui/folderman.cpp#L1332 |
@jnweiger can you trigger the message "The folder %1 is used in a folder sync connection!" at all? Also: can you check what the exact name is of the |
Never mind, I think I already found the issue. |
... and not the parent directory of the path. Fixes: #8849
... and not the parent directory of the path. Fixes: #8849
The dir() method will return the *parent* directory of the file/directory in the QFileInfo. So if "~/ownCloud" was passed in as the path, the check for .sync_*.db would be done on "~/". Because we're migrating from ._sync_*.db to .sync_*.db, it will now also check for the old filename. Fixes: #8849
Retested in an update scenario on Linux Mint:
|
I'd venture a guess:
TODO:
|
Retested the upgrade scenario in Fedora 33
|
I am not sure what the expected behaviour should be: a) Detect the folder sharing and prevent using that with 2.9.0 and later. Currently we do b) -- this has two disadvantages
To make b) nice and safe, I suggest to at least have a pop up a warning dialog, e.g. like this: "Warning: Legacy shared sync folder detected: Folder testpilotcloud3 is connected to [email protected] and [email protected] -- this can lead to bad side effects including data loss, especially when using VFS. Please resolve this as soon as possible. [Remove Account] [Continue for now]" Maybe (also) a pemanent red warning.... |
At the moment the behavior is ok, we didn't plan to break existing setups we just want that never to happen again. |
Since 838c072 we allow that multiple accounts share the same sync folder.
The text was updated successfully, but these errors were encountered: