Commit Graph

94 Commits (2970232790a24c07fb0154f901b4864d54a9d027)

Author SHA1 Message Date
Côme Chilliet 94254db001
chore(encryption): Cleanup typing in EncryptAll/DecryptAll
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-09 11:46:18 +07:00
Côme Chilliet b74c7538ac
fix(encryption): Do not depend upon user in session unless really necessary
Should fix a bunch of stuff when encryption listener is triggered by events from occ commands or background jobs

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-09 11:46:17 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Côme Chilliet f4b780bfea
fix(encryption): Pass an IUser and not a string to getUpdate
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-30 10:28:49 +07:00
Côme Chilliet 07f9d8f4c2
fix(encryption): Catch NotFoundException in ShareDeletedEvent listener
Avoids issues when a share is deleted after the node itself is already
 deleted.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-26 17:13:43 +07:00
Côme Chilliet a79b5dea7c fix(encryption): Improve Update class and event listenening
to avoid back&forth between path and Node object

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet 27599ef45d fix(encryption): Fix a PHP error in Encryption Util in specific situations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet 536ccf144c feat(encryption): Migrate from hooks to events
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
provokateurin c2fb7a72da
fix(psalm): Fix @throws annotations
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 17:18:30 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
John Molakvoæ 9197676b82
Merge branch 'master' into refactor/OC-Server-getEncryptionFilesHelper
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-06-04 15:47:48 +07:00
John Molakvoæ 57cd95f804
Merge pull request #40133 from summersab/refactor/OC-Server-getEncryptionKeyStorage 2024-06-04 15:46:54 +07:00
John Molakvoæ deaaa4beb6
chore: adjust conflicting php class name usage
Co-authored-by: Benjamin Gaussorgues <github-fa3ie@altahrim.net>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-05-30 14:42:36 +07:00
John Molakvoæ 16e331ffb9
Merge branch 'master' into refactor/OC-Server-getEncryptionFilesHelper
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-05-30 14:25:07 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Andrew Summers 6cc147c20c Refactor `OC\Server::getEncryptionKeyStorage`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:11:42 +07:00
John Molakvoæ edc35f74c7
Merge pull request #42893 from nextcloud/file-info-key-location 2024-02-23 19:36:25 +07:00
Robin Appelman edaa436345
add key location to info:file output
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-01 15:32:33 +07:00
Côme Chilliet c1d67cc614
chore: Fix DI for Encryption\DecryptAll command
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-01-30 16:03:17 +07:00
Robin Appelman 0492e0f1d4
Revert "add key location to info:file output"
This reverts commit 7bf82fc312.
2024-01-17 17:53:37 +07: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 +07: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 +07: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 +07:00
Andrew Summers be4e30917d
Refactor `OC\Server::getEncryptionFilesHelper`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2023-08-29 21:29:13 +07: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 +07:00
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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07:00
Carl Schwan ec6b83cc18 Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +07: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 +07:00
J0WI b344ff1a67 Refactor getEncryptionModule routine 2021-07-06 19:20:32 +07:00
Robin Appelman 1052feabed
remove depricated methods from MountConfig
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-16 13:55:19 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Vincent Petry 82891cd498
Fix phpcs issues in encryption update
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-19 14:12:10 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00