Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
734c62bee0
Format code according to PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
28f8eb5dba
Add visibility to all constants
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
44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
42625a46be
Remove spaces after method or function call
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
74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Daniel Kesselberg
8f403b66d1
Fix Argument 3 passed to OCA\Encryption\Recovery::__construct() must be an instance of OCA\Encryption\KeyManager
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
6 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
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>
6 years ago
Joas Schilling
0c77cd21f9
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Bjoern Schiessle
34d4c2bc16
improve variable naming
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
8796c6bc78
in case 'encryption_skip_signature_check' was set to true we accept if the file doesn't has a signature
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
7a61ffc3dd
Allow to disable the signature check
This allows you to recover encryption files even if the signature is broken
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
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
Stefan Weiberg
375f167c67
Adding a check to see if keyFileContents is empty:
* this fixes a download error and an exception if the data content
for encryption is empty
* #3958 : for recovering encrypted files with a damaged signature
this is necessary in addition to turning the signature check off
Signed-off-by: Stefan Weiberg <sweiberg@suse.com>
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>
7 years ago
Julius Härtl
03971d3695
Move encryption settings to security
Signed-off-by: Julius Härtl <jus@bitgrid.net>
7 years ago
Bjoern Schiessle
a9e22c5f1c
make file cache updates more robust
only update the encrypted version after the write operation is finished and the stream is closed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Arthur Schiwon
38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
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
Morris Jobke
d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
e2974f1133
Simplify return statement
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
a661f043e1
Remove unneeded semicolon and parentheses
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
0a56d2185e
Return value immediately instead of assigning to a one-time variable
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
464f024fa9
Use stripos instead of strpos(strtolower(), 'something')
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
2a38605545
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
0eebff152a
Update license headers
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
Morris Jobke
5987099d2a
Remove unneeded check if app is enabled
App code will not be executable if the app is not enabled, because the autoloader refuses to load that class.
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>
8 years ago
Joas Schilling
0ebdf871e0
Fix comparisons in encryption app
Signed-off-by: Joas Schilling <coding@schilljs.com>
9 years ago
Bjoern Schiessle
473824fa06
make sure that we always have a owner
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
8 years ago
Bjoern Schiessle
20a6b22db6
Add recovery key on public upload
In order to decide if a recovery key needs to be added we always
need to check the files owner settings and not the settings of
the currently logged in user.
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
8 years ago
Bjoern Schiessle
d668e17769
since the default for the master key changed we need to write the setting explicitely to the database if we migrate from a older version
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Bjoern Schiessle
66debbe18e
add occ command to disable the master key again
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
Bjoern Schiessle
28a7e72868
after the master key was loaded we are ready to go, no re-login needed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Bjoern Schiessle
da51ec38f4
only collect detailed access list if it is really needed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Bjoern Schiessle
9c5ba2f12c
make master key the new default
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
9 years ago
Arthur Schiwon
793de6a8d0
move encryption to security (and behind two factor things)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago
Arthur Schiwon
da53162656
We're on 13 now…
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago
Arthur Schiwon
39ca06e6b9
fix setting up encryption section
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago