Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
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>
6 years ago
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Roeland Jago Douma
9761822aeb
TO REVERT LATER: fix UserHooksTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* 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>
6 years ago
Joas Schilling
16d47b5928
Fix wrongly mixed mock objects in encryption tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Roeland Jago Douma
372f3d2a60
Remove deprecated functions from SecureRandom
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Bjoern Schiessle
87657fffd8
skip already encrypted files on encrypt all command
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
3adc2aca53
add occ command to recover encrypted files in case of password lost
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
8 years ago
Julius Härtl
0dd519cff1
Fix encryption admin section tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
8 years ago
Bjoern Schiessle
8042e6b8fb
this was a migration step to ownCloud 8.0 to restructure the encryption folder which is no longer needed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
8 years ago
Joas Schilling
3917a54113
Class "ProgressBar" is declared "final" and cannot be mocked.
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Joas Schilling
bf2be08c9f
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
c733cdaa65
Use ::class in test mocks of encryption app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
99934134dc
Use DI for IAppManager to encryption migration
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Kenneth Newwood
7092c50e7c
print generated encryption key passwords directly after generating the keys so that errors during the encryption do not lead to a potentially massive data loss
Signed-off-by: Kenneth Newwood <kenneth@newwood.name>
9 years ago
Bjoern Schiessle
001a9c02dd
adjust encryption tests to the new master key default
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Bjoern Schiessle
5f75468aa4
improve status messages
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Morris Jobke
1729e4471f
Update comments to Nextcloud
* based on PR by @Ardinis
* see #4311
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
9 years ago
Vincent Petry
6b9ef15803
Use master key for public links as well
9 years ago
Vincent Petry
305718370a
Add tests for null user
9 years ago
Bjoern Schiessle
9ce32d9941
always throw a encryption exception
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Bjoern Schiessle
fcda3a20f4
create new encryption keys on password reset and backup the old one
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Bjoern Schiessle
8a401ee156
check if session is initialized
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Roeland Jago Douma
6c5f7d586e
Fix migration tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
9 years ago
Joas Schilling
5e5e5b77d5
Fix encryption app
10 years ago
Roeland Jago Douma
680b557a4b
Fix apps warnings
10 years ago
Roeland Jago Douma
0c154c1ed7
Fix getMock encryption
10 years ago
Lukas Reschke
7ffb7b0d84
Use MockBuilder instead of createMock
CI uses an older PHPUnit
10 years ago
Lukas Reschke
8a7a0f3287
Add unit tests
10 years ago
Joas Schilling
0215b004da
Update with robin
10 years ago
Joas Schilling
813f0a0f40
Fix apps/
10 years ago
Lukas Reschke
aba539703c
Update license headers
10 years ago
Joas Schilling
4a3311f430
Move Encryption app to PSR-4 ( #24524 )
* Move Encryption to PSR-4
* Move encryption tests to PSR-4
* Fix the tests
10 years ago
Bjoern Schiessle
d86f8ba5f8
if we don't have a encrypted file key we can return a empty string right away
10 years ago
Bjoern Schiessle
088ffd05d7
don't create a private-/public-key pair for each user if the master key is enabled
10 years ago
Björn Schießle
a3381b1d0c
we need to initialize the mount points of the given user before we recover
access to his files
10 years ago