Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 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>
4 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 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>
4 years ago
Joas Schilling
16d47b5928
Fix wrongly mixed mock objects in encryption tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Joas Schilling
0c77cd21f9
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Bjoern Schiessle
34d4c2bc16
improve variable naming
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
5 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>
5 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>
5 years ago
Bjoern Schiessle
87657fffd8
skip already encrypted files on encrypt all command
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
5 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>
5 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>
5 years ago
Julius Härtl
03971d3695
Move encryption settings to security
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6 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>
6 years ago
Arthur Schiwon
38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 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>
6 years ago
Morris Jobke
d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
e2974f1133
Simplify return statement
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
a661f043e1
Remove unneeded semicolon and parentheses
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
0a56d2185e
Return value immediately instead of assigning to a one-time variable
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
464f024fa9
Use stripos instead of strpos(strtolower(), 'something')
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
2a38605545
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
99934134dc
Use DI for IAppManager to encryption migration
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 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>
6 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>
6 years ago
Joas Schilling
0ebdf871e0
Fix comparisons in encryption app
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Bjoern Schiessle
473824fa06
make sure that we always have a owner
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 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>
7 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>
7 years ago
Bjoern Schiessle
66debbe18e
add occ command to disable the master key again
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
5f75468aa4
improve status messages
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 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>
7 years ago
Bjoern Schiessle
da51ec38f4
only collect detailed access list if it is really needed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
9c5ba2f12c
make master key the new default
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Arthur Schiwon
793de6a8d0
move encryption to security (and behind two factor things)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Arthur Schiwon
da53162656
We're on 13 now…
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Arthur Schiwon
39ca06e6b9
fix setting up encryption section
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Arthur Schiwon
b7ce492c59
adapt encryption
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Morris Jobke
1729e4471f
Update comments to Nextcloud
* based on PR by @Ardinis
* see #4311
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Vincent Petry
6b9ef15803
Use master key for public links as well
7 years ago
Vincent Petry
43c081bdc9
Fix public link for master key
In public link mode there is no session, so the code should use the
public key instead.
7 years ago
Matthew Setter
d7c9e2b841
Updated UI messages relating to the encryption functionality
The reason for updating these messages, is that grammatically they're
not quite correct. They showed a combination of:
- Related phrases, which could be either separated or joined better
- Related sentences, but which should be expressed as separate ones
They were also missing full-stops to end the them.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Bjoern Schiessle
9ce32d9941
always throw a encryption exception
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 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>
7 years ago
Bjoern Schiessle
8a401ee156
check if session is initialized
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Maxence Lange
558a934842
init Session/privateKeys on Master Key
I can't find another way to init the session ...
7 years ago
Thomas Müller
8628d57b2c
Move console command registration to info.xml for encryption as well as files_external
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Joas Schilling
5e5e5b77d5
Fix encryption app
7 years ago