aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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
|\
| * 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>
* | Remember current cipherJ0WI2021-06-291-4/+23
|/ | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Merge pull request #26323 from J0WI/crypt-constblizzz2021-06-231-26/+24
|\ | | | | Use constant for supported formats
| * Use constant for supported formatsJ0WI2021-03-261-26/+24
| | | | | | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0427-37/+12
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | l10n: Unify spellingValdnet2021-05-201-3/+3
| | | | | | Spelling unification in Nextcloud applications.
* | Merge pull request #26219 from nextcloud/relative-path-nullRoeland Jago Douma2021-03-302-2/+2
|\ \ | | | | | | getRelativePath can return null
| * | getStorage can also return nullRobin Appelman2021-03-242-2/+2
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / Drop OpenSSL 0.9.8 workaroundJ0WI2021-03-261-7/+0
|/ | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Harden EncryptAll check for empty emailRoeland Jago Douma2021-02-151-1/+1
| | | | | | | Reported by psalm For #25641 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-114-24/+24
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-165-3/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* FIXME use default RC4 methodRoeland Jago Douma2020-12-071-2/+2
| | | | | | * We should pick better default method! Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix encryption testRoeland Jago Douma2020-12-071-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #24288 from ↵Morris Jobke2020-11-231-28/+3
|\ | | | | | | | | nextcloud/techdebt/noid/encryption-setup-dependency-cleanup Remove unused dependencies in encryption app setup
| * Remove unused dependencies in encryption app setupMorris Jobke2020-11-231-28/+3
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | [encryption] Remove dependency fetching inside the constructor and move them ↵Morris Jobke2020-11-221-15/+6
| | | | | | | | | | | | to method call parameters Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Auto-wire remaining encryption app services that depend on ViewMorris Jobke2020-11-221-54/+0
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Auto-wire as much as possible in the encryption appMorris Jobke2020-11-201-93/+0
| | | | | | Also cleans up only non-classname services in the server container Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update ScanLegacyFormat.phpessys2020-11-201-1/+1
| | | Fixed a small typo on line 99.
* Change to full class names for the encryption app DI in preparation of ↵Morris Jobke2020-11-111-44/+44
| | | | | | auto-wiring Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* The encryption decrypt position can be int or stringChristoph Wurst2020-10-132-2/+2
| | | | | | | The public API said string, internally we treated it as int. In reality both are used. Let's reflect that in the documented argument type. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Migrate encryption to the PSR containerChristoph Wurst2020-10-071-74/+77
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-054-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-2410-1/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22018 from nextcloud/bugfix/noid/harden-key-generationMorris Jobke2020-08-193-34/+77
|\ | | | | Harden SSE key generation
| * Fix typo in error message Morris Jobke2020-08-191-1/+1
| | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
| * Harden key generationJulius Härtl2020-08-143-34/+77
| | | | | | | | | | | | | | | | | | | | There might be cases where multiple requests trigger the key generation at the same time and the instance ends up with a non-fitting public/private key pair. Therefore the whole key generation should be locked. Other than that this makes sure that user key generation return values are properly validated. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Add legacy scanning commandRoeland Jago Douma2020-08-191-0/+140
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Make legacy cipher opt inRoeland Jago Douma2020-08-191-1/+16
| | | | | | | | | | | | | | | | * Systems that upgrade have this enabled by default * New systems disable it * We'll have to add some wargning in the setup checks if this is enabled Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Fix some MissingDocblockType or InvalidDocblock warnings.Daniel Kesselberg2020-08-141-2/+1
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>