aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Command
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-297-136/+18
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-235-11/+11
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* extend fix-key-location to handle cases from broken cross-storage movesRobin Appelman2023-08-311-36/+297
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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>
* Add fclose on opened resourcesCôme Chilliet2023-05-111-0/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Rename command to drop-legacy-filekey and remove comment about legacy mode.Côme Chilliet2023-05-111-3/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Copy data back instead of renaming to avoid changing the fileidCôme Chilliet2023-05-111-2/+11
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Copy and move files to migrate them to the new keyCôme Chilliet2023-05-091-12/+21
| | | | | | | We have to rewrite the header, so the whole file needs to be rewritten, so we just use the same strategy as DecryptAll. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix fopen modeCôme Chilliet2023-05-041-3/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add an occ command to scan files for legacy file key in use and get rid of thoseCôme Chilliet2023-05-042-2/+137
| | | | 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>
* | add migration for encryption keys in wrong locationRobin Appelman2022-11-281-0/+186
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-044-7/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update ScanLegacyFormat.phpessys2020-11-201-1/+1
| | | Fixed a small typo on line 99.
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-244-1/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add legacy scanning commandRoeland Jago Douma2020-08-191-0/+140
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Also always return in app commandsJoas Schilling2020-06-263-6/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-293-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-103-16/+4
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-093-3/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused importsChristoph Wurst2020-03-251-5/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-053-3/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-222-2/+0
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* add occ command to recover encrypted files in case of password lostBjoern Schiessle2018-08-161-0/+118
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* this was a migration step to ownCloud 8.0 to restructure the encryption ↵Bjoern Schiessle2018-03-021-127/+0
| | | | | | folder which is no longer needed Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Update license headersMorris Jobke2017-11-062-0/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* add occ command to disable the master key againBjoern Schiessle2017-07-061-0/+89
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Move console command registration to info.xml for encryption as well as ↵Thomas Müller2016-10-121-9/+8
| | | | | | files_external Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix apps/Joas Schilling2016-07-212-2/+4
|
* Update license headersLukas Reschke2016-05-262-2/+2
|
* Move Encryption app to PSR-4 (#24524)Joas Schilling2016-05-122-0/+212
* Move Encryption to PSR-4 * Move encryption tests to PSR-4 * Fix the tests