Commit Graph

72 Commits

Author SHA1 Message Date
Robin Appelman
0492e0f1d4
Revert "add key location to info:file output"
This reverts commit 7bf82fc312.
2024-01-17 17:53:37 +01:00
Robin Appelman
7bf82fc312
add key location to info:file output
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-17 17:47:01 +01:00
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>
2023-11-23 10:36:13 +01:00
Robin Appelman
e4f85226c5
extend fix-key-location to handle cases from broken cross-storage moves
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-31 19:46:47 +02:00
Faraz Samapoor
e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +03:30
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +02:00
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Robin Appelman
c2b206db64
add marker interface to mark system mount points for encryption
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-25 13:55:53 +02:00
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>
2022-08-01 09:46:40 +02:00
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>
2022-07-14 15:54:31 +02:00
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>
2022-06-07 15:38:45 +00:00
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>
2022-06-01 18:10:59 +02:00
Carl Schwan
ec6b83cc18 Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +02:00
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +01:00
J0WI
b344ff1a67 Refactor getEncryptionModule routine 2021-07-06 19:20:32 +02:00
Robin Appelman
1052feabed
remove depricated methods from MountConfig
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-16 13:55:19 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Vincent Petry
82891cd498
Fix phpcs issues in encryption update
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-19 14:12:10 +01:00
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>
2021-03-19 14:12:07 +01:00
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>
2021-02-18 13:31:24 +01:00
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>
2021-01-07 14:32:26 +01:00
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>
2020-12-29 12:29:23 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
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>
2020-08-20 15:42:43 +02:00
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>
2020-07-10 00:02:59 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst
44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst
85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +02:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
sammo2828
bb0c69524b
Keep the modification time during decryptFile 2020-02-01 16:20:33 +11:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
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>
2019-11-22 20:52:10 +01:00
Bjoern Schiessle
a2eaf48f6f
list files which could not be decrypted
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-12-14 12:00:49 +01:00
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>
2018-11-29 16:31:34 +01:00
Bjoern Schiessle
d76a87f3b0
skip already decrypted files on decrypt all command
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-10-24 16:53:39 +02:00
Roeland Jago Douma
74f0e37233
Remove deprecated \OCP\User::userExists
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-26 11:16:23 +02:00
Roeland Jago Douma
6c8caa1641
Remove deprecated \OCP\User::getUsers
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-25 20:33:24 +02:00
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>
2018-03-02 10:09:52 +01:00
Morris Jobke
6bbea33133
Simplify ternary operator statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 12:36:25 +01:00
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Bjoern Schiessle
da51ec38f4
only collect detailed access list if it is really needed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-07-06 11:33:08 +02:00
Bjoern Schiessle
86eb23b91e
don't try to encrypt/decrypt the certificate bundle
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-06-13 09:50:45 +02:00
Morris Jobke
c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00