Configure the maximum version value to try with "occ encryption:fix-encrypted-version"
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
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.
When an encrypted file is marked as not encrypted (oc_filecache.encrypted = 0 in database) occ encryption:fix-encrypted-version can be used to fix the value. However, right now it only tries to increment the version up to 5 and then gives up. The encrypted version is incremented whenever the file is written, so in frequently written files that limit can be too low and the version may not be fixed, even if it would if a higher value was tried.
Describe the solution you'd like
Extend occ encryption:fix-encrypted-version to configure the upper limit of the version to try.
Additional context
Follow up to #31874
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/encryption/lib/Command/FixEncryptedVersion.php, especially the version limit around lines 316-318, and trace how occ encryption:fix-encrypted-version handles its options. Add a configurable upper limit for the version it tries, then verify the command can use that limit when repairing encrypted files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, cli, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100