-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
In some setups, it can happen that encrypted files exist or have been recovered from backup.
When running occ files:scan on those files, the "encrypted" column will still say "0" which means unencrypted as the scan command is not able to detect if files are encrypted.
So those files are not accessible nor downloadable.
Describe the solution you'd like
Extend the occ encryption:fix-encrypted-version to also attempt to detect encrypted files that have the column set to 0.
The detection can attempt to set the value to "1" or higher as per its current algorithm and detect if decryption worked.
If decryption worked, it must adjust the value in the database.
There is already logic in place that does this for already encrypted files, so the extension should be a matter of including "0" in the files to be searched.
To avoid potential unwanted side effects, the option to include "0" in the search should be optional. So the user will need to add an option like --detect-encrypted (find better wording)
Additional context
This is with master key encryption.