Skip to content

Conversation

@schiessle
Copy link
Member

skip shared files, if files get decrypted only for a specific user we shouldn't touch files owned by a different user.

… shouldn't touch files owned by a different user.
@MorrisJobke
Copy link
Member

Could you link to an issue or describe the issue here?

@schiessle
Copy link
Member Author

Scenario 1:

If you run ./occ encryption:decrypt-all MorrisJobke you don't want to decrypt my files just because I shared them with you.

Scenario 2:

Your run ./occ encryption:decrypt-all to decrypt the files for all users. In this case we don't have to go through all the shared files for each user who has access to it. In this case it is enough if we decrypt the files only for the owners and at the end all files will be decrpyted. We already check that we don't try to decrypt shared files multiple times. But for large shared folders it can still be a performance improvement if we don't look at every file just to decide that we don't have to decrypt it.

@icewind1991
Copy link
Member

How does/should this handle external storages? They aren't always per-user

@schiessle
Copy link
Member Author

How does/should this handle external storages? They aren't always per-user

Nothing change here. We will look at the file for every user, if it is already decrypted we skip it, if not we decrypt it. Maybe we can optimize this as well in the future. But for this PR let's concentrate on the shared files.

@MorrisJobke
Copy link
Member

Tested and works 👍 (before this a decrypt-all called on a users also decrypts all files that are shared with that user)

@MorrisJobke
Copy link
Member

@nickvergessen
Copy link
Member

👍

@nickvergessen nickvergessen merged commit e4311a2 into master Aug 31, 2016
@nickvergessen nickvergessen deleted the small-encryption-improvement branch August 31, 2016 10:30
@nickvergessen
Copy link
Member

Backport applicable?

@MorrisJobke
Copy link
Member

Backport applicable?

cc @schiessle

@schiessle
Copy link
Member Author

yes, I think backports make sense... I will prepare them

@schiessle
Copy link
Member Author

stable10: #1345

@MorrisJobke
Copy link
Member

stable10: #1345

Mind to remove the label ;)

R0Wi pushed a commit to R0Wi/server that referenced this pull request Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants