summaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests
Commit message (Collapse)AuthorAgeFilesLines
* Adapt encryption test to change in generateHeaderCôme Chilliet2023-06-011-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Adjust console formatter code to match with Symfony type hintsFerdinand Thiessen2023-04-171-1/+4
| | | | | | | Symfony has added type hints on the `OutputFormatterInterface`, so we must adjust our type hints to match with Symfony. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
* Merge pull request #36351 from ↵Joas Schilling2023-04-141-0/+8
|\ | | | | | | | | nextcloud/bugfix/noid/move-encryption-password-email-to-template Move encrypt-all password email to EmailTemplate
| * Fix unit testsJoas Schilling2023-03-081-0/+8
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #36836 from nextcloud/fix/view-type-cleanupCôme Chilliet2023-04-051-1/+1
|\ \ | | | | | | Tidy up typing in OC\Files\View
| * | Remove unused method getLocalFolderCôme Chilliet2023-04-031-1/+1
| | | | | | | | | | | | | | | | | | It’s not used and not in any OCP interface/class. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | | Merge pull request #37243 from nextcloud/enh/openssl-get-rid-of-rc4Côme Chilliet2023-04-044-31/+67
|\ \ \ | |/ / |/| | Getting rid of openssl_seal and rc4 in server side encryption
| * | Add a test for multiKeyEncrypt/Decrypt methodsCôme Chilliet2023-03-201-4/+15
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Adapt encryption recovery tests to new systemCôme Chilliet2023-03-171-5/+9
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Adapt encryption tests to the new systemCôme Chilliet2023-03-171-19/+40
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Adapt code to new encryption systemCôme Chilliet2023-03-171-3/+3
| |/ | | | | | | | | | | | | | | | | 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>
* / add test for unmarking encrypted file on cross storage moveRobin Appelman2023-04-011-0/+85
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #35108 from nextcloud/encryption-fix-versions-allVincent Petry2022-12-161-1/+1
|\ | | | | allow running encryption:fix-encrypted-version for all users
| * allow running encryption:fix-encrypted-version for all usersRobin Appelman2022-11-291-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Replace getSystemValue in encryption appJ0WI2022-12-051-5/+5
|/ | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Adapt test to fixed command output.Côme Chilliet2022-08-041-3/+14
| | | | | | | No user and non-existing user are now correctly treated as two separated cases Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove at() matcher use from encryption testsCôme Chilliet2022-05-243-33/+43
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Save encrypted files in binary formatplumbeo2022-05-041-9/+14
| | | | | | | | | | | | | 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 tests on PHP 8.1 for encryption, files_sharing, files_version,Côme Chilliet2021-12-161-1/+4
| | | | | | 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-0/+40
| | | | | | | | | | | | 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>
* Prevent running FixEncryptedVersion without master keyVincent Petry2021-06-291-0/+46
| | | | | | | 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-153/+80
| | | | | | | 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>
* Downstream FixEncryptedVersionTestVincent Petry2021-06-291-0/+373
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0416-17/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix testMorris Jobke2021-05-201-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-162-2/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused dependencies in encryption app setupMorris Jobke2020-11-231-10/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-053-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-243-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22018 from nextcloud/bugfix/noid/harden-key-generationMorris Jobke2020-08-192-5/+51
|\ | | | | Harden SSE key generation
| * Test for locking state in key generationJulius Härtl2020-08-142-5/+51
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Make legacy cipher opt inRoeland Jago Douma2020-08-192-11/+22
|/ | | | | | | | * 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>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-1214-100/+100
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-1015-65/+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 elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-096-12/+12
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-0913-13/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-3110-0/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-271-2/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-251-2/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-263-62/+62
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-258-20/+20
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-0516-18/+22
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* TO REVERT LATER: fix UserHooksTestRoeland Jago Douma2019-11-271-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-279-50/+46
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-2716-17/+17
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-2214-16/+3
| | | | | | | | | | | * 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>