Côme Chilliet
f6365e76a1
fix(encryption): Do not register user key related event listeners
when master key is enabled.
Also added a safeguard in PassphraseService.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
5 months ago
Ferdinand Thiessen
a3c2600386
fix(encryption): init keys also when logged in using cookie auth
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
8 months ago
Ferdinand Thiessen
313d2219fd
fix(encryption): Listen for user login and logout to set encryption key
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
8 months ago
Ferdinand Thiessen
f3aa004b1c
refactor(encryption): Migrate away from Hooks to typed events
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Louis <louis@chmn.me>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 year ago
Côme Chilliet
1a4978c4ea
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Louis Chemineau
39fd19f1d6
refactor(encryption): Migrate app.php to Application.php
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 year ago
Andy Scherzinger
5b7dcc1427
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 year ago
Côme Chilliet
1e06b61f59
Migrate away from ILogger in encryption
And modernize code a bit
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
5 years ago
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Morris Jobke
efe644137d
[encryption] Remove dependency fetching inside the constructor and move them to method call parameters
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Morris Jobke
858c7f4032
Auto-wire remaining encryption app services that depend on View
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Morris Jobke
5be18215fb
Auto-wire as much as possible in the encryption app
Also cleans up only non-classname services in the server container
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Morris Jobke
42a033bbc4
Change to full class names for the encryption app DI in preparation of auto-wiring
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Christoph Wurst
8033655a5a
Migrate encryption to the PSR container
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Julius Härtl
36cfdd320b
Harden key generation
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>
5 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
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
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
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
0c77cd21f9
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 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
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 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
Arthur Schiwon
b7ce492c59
adapt encryption
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago
Arthur Schiwon
f3b15a9ab9
fixes, improvements, and another app:
* setupSettings now also triggered on enable
* fixes detection of present admin section or settings in the DB
* add update routine in such cases
* encryption app migrated
9 years ago
Joas Schilling
813f0a0f40
Fix apps/
9 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
088ffd05d7
don't create a private-/public-key pair for each user if the master key is enabled
10 years ago
Bjoern Schiessle
5e267589d4
only create and update user specific key if no master key is enabled
10 years ago
Björn Schießle
40a5ba72fc
sign all encrypted blocks and check signature on decrypt
10 years ago
Thomas Müller
682821c71e
Happy new year!
10 years ago
Bjoern Schiessle
5fad45b230
make encryption configurable for home storage
10 years ago
Morris Jobke
b945d71384
update licence headers via script
10 years ago
Bjoern Schiessle
9bd4f2d41e
occ script to disable encryption and to decrypt all files again
10 years ago
Bjoern Schiessle
7f459c64cb
check for the right user if we can change his password
10 years ago
Bjoern Schiessle
f893de4136
use login name for password reset
10 years ago
Bjoern Schiessle
8c08dd0ac2
occ tool to encrypt all files
10 years ago
Morris Jobke
f63915d0c8
update license headers and authors
11 years ago
Bjoern Schiessle
68db3059ee
detect migration status
11 years ago
Bjoern Schiessle
7676166254
add l10n to constructor
11 years ago
Bjoern Schiessle
887be709f5
a new approach to display the error message
11 years ago