Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
7 months ago
Robin Appelman
e4f85226c5
extend fix-key-location to handle cases from broken cross-storage moves
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
1 year ago
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Robin Appelman
c2b206db64
add marker interface to mark system mount points for encryption
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Carl Schwan
458c2fa297
Remove OCP\App and OCP\BackgroundJob
Both deprecated since NC 23
IAppManager is the replacement for OCP\App unfortunately it can't be
dependency injected in classes used by the installed otherwise the
database connection is initialised too early
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Carl Schwan
d5c23dbb9f
Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Carl Schwan
5907bba3fd
Fix hook encryption with cron job
Make sure the setup fs is set before using the Update service
Fix #29674
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Vincent Petry
a704bcf97f
Trim mount point before matching in encryption code
Often times the mount point has a leading slash.
This fix sanitizes it to make sure matching works.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2 years ago
Carl Schwan
ec6b83cc18
Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
J0WI
b344ff1a67
Refactor getEncryptionModule routine
3 years ago
Robin Appelman
1052feabed
remove depricated methods from MountConfig
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Vincent Petry
82891cd498
Fix phpcs issues in encryption update
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Julius Härtl
76170a58eb
Log and continue when failing to update encryption keys during for individual files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Roeland Jago Douma
317118ef79
Catch throwable instead of exception
The error that gets thrown can also be a type error etc. So we should
properly catch the Throwable.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Robin Appelman
8501cf9b5c
dont apply encryption wrapper for root mount
the `shouldEncrypt` already disables encryption for anything thats not in the users data folder,
however the encryption wrapper being applied anyway on the root folder breaks groupfolders
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Roeland Jago Douma
5340ab3a75
New SSE key format
* Encrypt the keys with the instance secret
* Store them as json (so we can add other things if needed)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Morris Jobke
065ef14cb0
Move OC_Mount_Config to proper classname and remove OC::$CLASSPATH usage in files_external
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 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>
4 years ago
Christoph Wurst
44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 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>
4 years ago
Christoph Wurst
85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
sammo2828
bb0c69524b
Keep the modification time during decryptFile
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
Bjoern Schiessle
a2eaf48f6f
list files which could not be decrypted
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
5 years ago
Robin Appelman
2c1f6331a4
Add interface to allow storages from opting out of encryption
As opposed to hard-coding a list of excluded storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago
Bjoern Schiessle
d76a87f3b0
skip already decrypted files on decrypt all command
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
5 years ago
Roeland Jago Douma
74f0e37233
Remove deprecated \OCP\User::userExists
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
6c8caa1641
Remove deprecated \OCP\User::getUsers
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
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
6bbea33133
Simplify ternary operator statements
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
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
86eb23b91e
don't try to encrypt/decrypt the certificate bundle
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Morris Jobke
c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Joas Schilling
1c0bffe87f
Fix translations
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Joas Schilling
629b7c0fc3
Adjust docs and make !$currentAccess simpler
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago