Skip to content
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

Ensure we have valid permissions when checking whether a move is allowed #8837

Closed
TheOneRing opened this issue Jul 23, 2021 · 2 comments
Closed

Comments

@TheOneRing
Copy link
Contributor

TheOneRing commented Jul 23, 2021

If we perform a move and revert we can hit an assert that instantly kills the client.

How to reproduce with 2.8:
#8033 (comment)

In 2.9 we require new database entries to have valid permissions set and fetch the permissions if required.
https://github.com/owncloud/client/pull/8067/files etc

That means that with 2.9 it is basically not possible to run in that scenario.
But if we upgrade from a compromised 2.8 database this can still happen.

TODO:
Fetch the permissions if they are null
https://github.com/owncloud/client/blob/master/src/libsync/discovery.cpp#L1265
https://github.com/owncloud/client/blob/master/src/libsync/discovery.cpp#L1179

@TheOneRing

This comment has been minimized.

TheOneRing added a commit that referenced this issue Aug 4, 2021
If the local permissions are not correct we perform a prohibited move
The move fails with 403 and creates a blacklist entry, but we might get the correct permissions for that file.

In the next sync the we don't retry the move as we have the correct permissions now so we want to restore the original file.
The original file however is now on the blacklist we mark the restoration as ignore and end up in findAndCancelDeletedJob

Fixes: #8837
@TheOneRing
Copy link
Contributor Author

If the local permissions are not correct we perform a prohibited move
The move fails with 403 and creates a blacklist entry, but we might get the correct permissions for that file.

In the next sync the we don't retry the move as we have the correct permissions now so we want to restore the original file.
The original file however is now on the blacklist we mark the restoration as ignore and end up in findAndCancelDeletedJob

TheOneRing added a commit that referenced this issue Aug 4, 2021
If the local permissions are not correct we perform a prohibited move
The move fails with 403 and creates a blacklist entry, but we might get the correct permissions for that file.

In the next sync the we don't retry the move as we have the correct permissions now so we want to restore the original file.
The original file however is now on the blacklist we mark the restoration as ignore and end up in findAndCancelDeletedJob

Fixes: #8837
TheOneRing added a commit that referenced this issue Aug 4, 2021
If the local permissions are not correct we perform a prohibited move
The move fails with 403 and creates a blacklist entry, but we might get the correct permissions for that file.

In the next sync the we don't retry the move as we have the correct permissions now so we want to restore the original file.
The original file however is now on the blacklist we mark the restoration as ignore and end up in findAndCancelDeletedJob

Fixes: #8837
dragotin pushed a commit that referenced this issue Aug 10, 2021
If the local permissions are not correct we perform a prohibited move
The move fails with 403 and creates a blacklist entry, but we might get the correct permissions for that file.

In the next sync the we don't retry the move as we have the correct permissions now so we want to restore the original file.
The original file however is now on the blacklist we mark the restoration as ignore and end up in findAndCancelDeletedJob

Fixes: #8837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant