aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Command/FixEncryptedVersion.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: throw a better error if we can't get the encrypted header sizeencryption-no-header-size-errorRobin Appelman2025-05-091-1/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-8/+8
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Uses early returns.Faraz Samapoor2024-08-161-11/+13
| | | | | | To improve code readability. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* Refactors encryption app commands.Faraz Samapoor2024-08-161-11/+9
| | | | | | To improve code readability. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-291-18/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Migrate away from ILogger in encryptionCôme Chilliet2023-08-081-34/+9
| | | | | | And modernize code a bit Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #34724 from nextcloud/encryption-read-before-cacheVincent Petry2022-12-201-0/+8
|\ | | | | fix reading newly written encrypted files before their cache entry is written
| * clear is-encrypted cache when trying to fix encrypted versionRobin Appelman2022-12-011-0/+8
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #35108 from nextcloud/encryption-fix-versions-allVincent Petry2022-12-161-13/+38
|\ \ | | | | | | allow running encryption:fix-encrypted-version for all users
| * | allow running encryption:fix-encrypted-version for all usersRobin Appelman2022-11-291-13/+38
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / Replace getSystemValue in encryption appJ0WI2022-12-051-1/+1
|/ | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* skip files that cant be opened for FixEncryptedVersionRobin Appelman2022-11-221-0/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix encryption:fix-encrypted-version command when encrypted is set to 0Côme Chilliet2022-08-021-0/+16
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve typing in FixEncryptedVersion commandCôme Chilliet2022-08-021-23/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix tests on PHP 8.1 for encryption, files_sharing, files_version,Côme Chilliet2021-12-161-4/+1
| | | | | | files_trashbin and theming apps Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix encrypted version to 0 when finding unencrypted fileVincent Petry2021-08-261-1/+28
| | | | | | | | | | | | Whenever the command is run and a "legacy cipher" seems to be detected when the legacy option is disabled, it's highly likely that the file is actually unencrypted but the database contains a encrypted version higher than 0 for some reason. The command now detects this case and automatically sets the encrypted version to 0 so that the file can be read again. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Migrate HintException to OCPGary Kim2021-06-301-1/+1
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Prevent running FixEncryptedVersion without master keyVincent Petry2021-06-291-1/+18
| | | | | | | Return an error when running occ encryption:fix-encrypted-version when master key encryption is not enabled. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix FixEncryptedVersionTest testVincent Petry2021-06-291-5/+5
| | | | | | | Fixed setup to use EncryptionTrait like other existing tests. Fix expectations to not rely on side effects from previous test cases. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix warnings in FixEncryptedVersion commandVincent Petry2021-06-291-13/+26
| | | | | | Fixed code warnings Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Detect disabled signature check when reparingVincent Petry2021-06-291-1/+13
| | | | | | | | | When running occ encryption:fix-encrypted-version, detect whether the setting 'encryption_skip_signature_check' is set and abort if it is, because the repair cannot detect version mismatch errors with it enabled. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Downstream encryption:fix-encrypted-versionVincent Petry2021-06-291-0/+244
For fixing "Bad signature" errors. Signed-off-by: Vincent Petry <vincent@nextcloud.com>