Commit graph

409 commits

Author SHA1 Message Date
Ferdinand Thiessen
660f3f6fd1
refactor: use logical && || instead of weak and or operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +02:00
Côme Chilliet
14d6945054
fix(encryption): Take encryption enabled status into account
shouldEncrypt now returns false for all paths if encryption is disabled.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-09 11:46:18 +02:00
Côme Chilliet
12532bb535
fix(encryption): Correctly set encrypted to 0 when copying
If encryption got disabled, copying should set encrypted to 0 for the
 new unencrypted copy. For instance when using encryption:decrypt-all

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-09 11:46:18 +02:00
Côme Chilliet
8c21f2b19c fix(encryption): Fix TypeError when trying to decrypt unencrypted file
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-08-25 13:18:50 +02:00
John Molakvoæ
4eee160c15
Merge pull request #53729 from nextcloud/dav-external-url-encoded-root 2025-08-01 09:31:14 +02:00
Côme Chilliet
4427050f84 fix(encryption): Correctly handle file opening and copying failures
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-03 15:19:34 +02: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 +02:00
Robin Appelman
6d0119bf8d
fix: handle dav external storage roots with spaces
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-30 18:01:01 +02:00
Daniel Kesselberg
de54bdb06b
fix: handle ambiguous IResponse.getBody return types
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-06-30 11:50:11 +02:00
Ferdinand Thiessen
01db539d0a
chore: move streamCopy implementation from OC_Helper to OCP\Files
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 13:03:05 +02:00
John Molakvoæ
b3b63020c9
Merge pull request #52812 from nextcloud/chore/oc-helper-rmdirr 2025-05-14 21:53:47 +02:00
Ferdinand Thiessen
072d4e8cba
chore: move implementation from OC legacy to OCP\Files
- move implementation to the OCP variant that called the legacy before
- add the missing deprecation notice
- add missing parameter to align both signatures
- use OCP\Files where this method is still used

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-14 14:55:45 +02:00
Côme Chilliet
a86d917907 fix(encryption): Only prevent cache deletion if target is not object store in moveFromStorage
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02: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 +02:00
Côme Chilliet
e6275f8759 fix: Preserve file id when moving from object store even if encryption wrapper is present
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Côme Chilliet
9bb0721d66 fix: Fix mtime preservation when moving a directory across storages with encryption registered
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Côme Chilliet
8779ae38a4 fix(encryption): Fix filesize for part files in Encryption wrapper
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Robin Appelman
768b101a9d
Merge pull request #52706 from nextcloud/info-file-more-encryption-checks
feat: add more encryption checks to info:file
2025-05-12 13:17:26 +02:00
Robin Appelman
e6bdfcd8ed
Merge pull request #52665 from nextcloud/mountpoint-mkdir-quota
fix: create mountpoint folder even if the user has a quota of 0
2025-05-12 13:17:02 +02:00
Robin Appelman
b0b8159d6a
fix: throw a better error if we can't get the encrypted header size
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-09 22:33:45 +02:00
Robin Appelman
d9c53ef748
feat: add more encryption checks to info:file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-09 16:35:31 +02:00
Robin Appelman
cd75876c1e fix: create mountpoint folder even if the user has a quota of 0
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 15:15:36 +02:00
Robin Appelman
012a402cec fix: restore updated encrypted version when copying versions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:21:01 +01:00
Robin Appelman
41c53648ad
Merge pull request #49262 from nextcloud/move-from-encryption-no-opt
fix: don't do same-storage move optimization with encryption wrappers
2024-12-05 17:42:47 +01:00
Louis
27331d48e3
Merge pull request #48651 from nextcloud/artonge/fix/copy_cache_during_copy_operations
fix(files): Correctly copy the cache information during copy operations
2024-12-04 16:58:01 +01:00
Robin Appelman
ae30269eac
fix: don't set 'name' on null metadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-03 19:12:45 +01:00
Louis Chemineau
199b0bd4d9
fix(files): Correctly copy the cache information on copy operations
Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-12-03 17:04:44 +01:00
Git'Fellow
60d956f39f refactor(storage): Code adjustements and simplifications
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-11-21 10:02:00 +01:00
Git'Fellow
8755bf1815 fix(storage): Try to delete existing target
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Add same logic to common storage
2024-11-20 09:42:33 +01:00
Robin Appelman
0bc478de2c
fix: don't do same-storage move optimization with encryption wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-11-13 18:47:13 +01:00
skjnldsv
954b6c68a0 chore: use $this->logger and prevent Server::get
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-11-08 10:56:30 +01:00
Victor Dubiniuk
0f96a2ccb9 Fix Undefined variable: response notice in case of non-404 error
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-11-08 10:56:25 +01:00
John Molakvoæ
e3e22e28c0
Merge pull request #47847 from nextcloud/fix-copying-or-moving-from-shared-groupfolders 2024-10-29 11:33:12 +01:00
provokateurin
0de4843b73 refactor(Storage): Align all Storage constructors
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-23 13:24:18 +02:00
Thomas Citharel
dcd27fd986
feat(http-client): expose default request timeout constant to be used instead of magic number 30
Will be used to set default where we are able to override the default timeout.

See https://github.com/nextcloud/server/pull/48418

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2024-10-11 10:57:02 +02:00
Daniel Calviño Sánchez
3017951d1d fix: Fix copying or moving from shared groupfolders
When copying or moving between two local storages the source path (on
disk) to copy or move from is got from the unjailed path of the source
storage. However, if the source storage has more than one jail getting
the unjailed path resolves the most external jail, but the source path
needs to be got from the most internal jail instead (the one closer to
the local storage).

This can happen, for example, with a shared groupfolder: in that case
there is an external jail for the shared storage, and one internal jail
for the groupfolder storage wrapped by the shared storage.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2024-10-10 15:16:12 +02:00
Kate
43b1fd7bb8
Merge pull request #48623 from nextcloud/fix/allow-quota-wrapper-check 2024-10-09 18:39:42 +02:00
Julius Knorr
75381dfe0c
fix: Allow overriding shouldApplyQuota check from child classes
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-10-09 08:25:30 +02:00
provokateurin
f28e74b7a8
refactor(Storage): Make all parameter types strong types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-07 15:00:05 +02:00
provokateurin
4412b2b8a8
refactor(Wrapper\Encryption): Migrate to strong types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-07 14:11:56 +02:00
Kate
26762172f5
Merge pull request #48454 from nextcloud/fix/storage/get-directory-content-return-type 2024-10-01 16:22:16 +02:00
Robin Appelman
1bf27e74dd
Merge pull request #48235 from nextcloud/readd-object-store-phpunit
test: re-add object store primary storage phpunit tests
2024-10-01 15:11:10 +02:00
provokateurin
e1998b6b6c
fix(Storage): Fix getDirectoryContent() return type
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-30 16:49:27 +02:00
Côme Chilliet
6ef05bafeb
fix: Fix test of IConstructableStorage implentation by storage classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-30 11:21:42 +02:00
Robin Appelman
888d06dff9
fix: preserve fileid when moving from objectstore to non-objectstore
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-27 14:45:42 +02:00
provokateurin
7cdccd058f
fix(Storage): Fix IStorage return types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-26 18:13:03 +02:00
Côme Chilliet
94b0a0e863 fix: Move storage constructor to specific interface
That allows Wrappers to use DI and not care about the constructor

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-23 09:46:44 +02: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 +02:00
provokateurin
d2d1e3284d
fix(Storage): Fix method docs inheritance
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:20:38 +02:00
provokateurin
8ca6fcace7
fix(Storage): Document getOwner() can return false
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:10:50 +02:00