aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
Commit message (Collapse)AuthorAgeFilesLines
* fix: add default value for new flag `$useDecryptAll` on getFileKeyCôme Chilliet2024-06-111-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Autodetect legacy filekey instead of trusting the header for legacy headerCôme Chilliet2024-06-112-22/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-041-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-2312-40/+40
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Convert isset ternary to null coalescing operatorHamid Dehnavi2023-09-281-1/+1
| | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.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>
* Improve typing as suggested by reviewCôme Chilliet2023-08-081-32/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate away from ILogger in encryptionCôme Chilliet2023-08-088-421/+119
| | | | | | And modernize code a bit Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix sharing of encrypted filesCôme Chilliet2023-07-181-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(i18n) Changed grammar related to "login"rakekniven2023-07-151-1/+1
| | | Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
* Increase from 100000 to 600000 iterations for hash_pbkdf2Côme Chilliet2023-05-231-9/+9
| | | | 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>
* Log failures to delete legacy file keyCôme Chilliet2023-05-041-1/+6
| | | | 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 #37724 from nextcloud/fix/encryption-signature-check-logicChristoph Wurst2023-04-171-4/+6
|\ | | | | Cleanup signature checking logic in encryption
| * Cleanup signature checking logic in encryptionjld31032023-04-141-4/+6
| | | | | | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* | Merge pull request #36351 from ↵Joas Schilling2023-04-141-39/+34
|\ \ | |/ |/| | | | | nextcloud/bugfix/noid/move-encryption-password-email-to-template Move encrypt-all password email to EmailTemplate
| * Move encrypt-all password email to EmailTemplateJoas Schilling2023-03-081-39/+34
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add a test for multiKeyEncrypt/Decrypt methodsCôme Chilliet2023-03-201-0/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix encryption file key managementCôme Chilliet2023-03-172-2/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Adapt code to new encryption systemCôme Chilliet2023-03-174-59/+53
| | | | | | | | | | | | | | | | | | fileKey gets deleted upon save as it’s stored in shareKeys instead now. We use presence of a fileKey to detect if a file is using the legacy system or the new one, because we do not always have access to header data. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Getting rid of openssl_seal and rc4 in server side encryptionCôme Chilliet2023-03-173-24/+94
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Set functions as private to be able to refactor laterCôme Chilliet2023-02-211-7/+9
| | | | | | Also a few comment fixes Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Move to phpseclib implementation of RC4Côme Chilliet2023-02-211-42/+16
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Strong type custom openssl_seal implementationCôme Chilliet2023-02-211-28/+12
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Always wrap rc4, and throws on unknown cipherCôme Chilliet2023-02-211-34/+11
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* introduce wrapped_openssl_seal() and wrapped_openssl_open() to circument RC4 ↵Kevin Niehage2023-02-211-2/+164
| | | | | | problems with OpenSSL v3 Signed-off-by: Kevin Niehage <k.niehage@syseleven.de>
* Remove workarounds specific to 7.4Côme Chilliet2023-01-201-4/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm issues related to signature changes from PHP 8.0Côme Chilliet2022-12-291-1/+1
| | | | 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-052-4/+4
| |/ |/| | | | | 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 typos in apps/ subdirectoryluz paz2022-09-051-1/+1
| | | | | | | Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/` Signed-off-by: luz paz <luzpaz@github.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* 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>
* Save encrypted files in binary formatplumbeo2022-05-042-26/+71
| | | | | | | | | | | | | Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on https://github.com/owncloud/encryption/pull/224 and https://github.com/owncloud/core/pull/38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
* Fix a few psalm issues and moved back to psalm/phar 4.18Carl Schwan2022-01-124-6/+6
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* 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>
* Generate strong, human readable OTPJ0WI2021-07-081-1/+1
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Migrate HintException to OCPGary Kim2021-06-301-1/+1
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Merge pull request #27638 from nextcloud/enh/noid/fix-encrypted-versionJulius Härtl2021-06-301-0/+286
|\