366 Commits

Author SHA1 Message Date
provokateurin
d1ac31a1b3 fix(files): Stop overwriting scan_permissions
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-11-18 13:15:50 +01:00
Côme Chilliet
afa85490c9 fix(encryption): Fix TypeError when trying to decrypt unencrypted file
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-08-26 08:36:15 +02:00
Côme Chilliet
72eba38e20 fix(encryption): Correctly handle file opening and copying failures
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-03 14:02:48 +02:00
Louis
921c98e4df Merge pull request #52696 from nextcloud/backport/49903/stable30 2025-05-16 16:23:56 +02:00
Robin Appelman
855f3f1b4f Merge pull request #52763 from nextcloud/backport/52706/stable30
[stable30] feat: add more encryption checks to info:file
2025-05-15 14:05:34 +02:00
Robin Appelman
fa135d9535 fix: throw a better error if we can't get the encrypted header size
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 14:14:59 +02:00
Robin Appelman
0fe56ce669 feat: add more encryption checks to info:file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 11:27:29 +00:00
Robin Appelman
697a20ef2a fix: restore updated encrypted version when copying versions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 18:57:17 +00:00
Ferdinand Thiessen
832f79ac93 chore: apply code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-30 19:04:59 +02:00
Louis Chemineau
a663b3e0cd 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>
2025-02-13 23:35:59 +00:00
Robin Appelman
e85d5df5f0 fix: preserve fileid when moving from objectstore to non-objectstore
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-13 17:31:51 +01:00
Ferdinand Thiessen
67e0ef5b72 fix(files): Do not array access null value
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-28 20:51:42 +01:00
Git'Fellow
003bb0aca4 fix(storage): Try to delete existing target
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-11-21 07:44:43 +01:00
Josh Richards
1fc1543a8b fix: Clean-up some remaining readdir calls with undesirable false evaluation potential
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2024-11-13 09:11:17 +05:30
Victor Dubiniuk
e1df152eb9 Fix Undefined variable: response notice in case of non-404 error
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-11-08 16:14:47 +00:00
Daniel Calviño Sánchez
1a98cd52b5 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-29 15:02:49 +00:00
Julius Knorr
643e9ffb06 fix: Allow overriding shouldApplyQuota check from child classes
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-10-28 09:46:45 +01:00
John Molakvoæ
2308294a68 chore: improve hash_file php usage in Local Storage
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-09-16 17:08:10 +00:00
Louis Chemineau
7c99850958 fix(files): Ensure that the hash method does not return null
To match beececf660/lib/private/Files/View.php (L1050)

- Fix https://github.com/nextcloud/server/issues/44110

Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-16 17:08:10 +00:00
provokateurin
eb3c1a2bee fix(Storage\Local): Do not call getSourcePath() on SplFileInfo
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-15 14:53:34 +00:00
Ferdinand Thiessen
bcd26323c1 fix: Also validate parent path in verifyPath
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-28 20:24:03 +02:00
Robin Appelman
fff198657f fix: use mountpoint from storage to find the encryption keys
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-20 14:24:43 +00:00
Côme Chilliet
277c2cf5d1 fix(encryption): Fix mountpoint check to accept if several are found
There is no strong requirement to have only one mount for a given
 storage id. Also the error in this case would be misleading.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-08-05 17:34:25 +02:00
withbest
dd08f93202 chore: fix some comments
Signed-off-by: withbest <seekseat@outlook.com>
2024-07-29 14:43:27 +08:00
Dennis Verspuij
181aecad4c fix: Release directory iterator and thereby its potential directory lock prior to deleting a directory, to avoid e.g. "Text file busy" error with VirtualBox shared folder storage
Signed-off-by: Dennis Verspuij <6680484+dennisverspuij@users.noreply.github.com>
2024-07-27 16:37:16 +02:00
Ferdinand Thiessen
69341e4306 refactor: Migrate filename validation logic from Storage to FilenameValidator
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-16 12:49:09 +02:00
John Molakvoæ
91227c908b Merge branch 'master' into refactor/OC-Server-getHTTPClientService
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-05-30 14:21:45 +02:00
Andy Scherzinger
dae7c159f7 chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00
Côme Chilliet
672923f0a6 fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:23:58 +02:00
Joas Schilling
7cfe36e49b fix(storage): Fix DAV storage as false is never returned
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-22 21:06:00 +02:00
Joas Schilling
64d32abb48 fix(CI): Suppress psalm UndefinedClass
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-18 09:24:11 +02:00
Joas Schilling
050408c9de fix(files): Also skip cross storage move with access control
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-17 16:29:07 +02:00
Julius Härtl
e0fcf6b700 Merge pull request #44294 from nextcloud/fix/storage-mount-owner
fix: Pass the mountpoint target user to storages without owner
2024-04-09 13:18:13 +02:00
Julius Härtl
4910e7e231 fix: Pass the mountpoint target user to storages without owner
Storages that do not have a dedicated owner (e.g. groupfolders, external
storages) currently always assume the current session user as the owner.
This leads to several issues when there is no user session but a node is
obtained through a user folder.

In order to have the correct user available we need to pass the user
that is used to setup a mountpoint along to the storage layer as we
generally assume that an owner is available for those.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-04-09 09:04:24 +01:00
Robin Appelman
d31ed8dbca fix: use proper jailed patch in watcher
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-04-08 18:37:05 +02: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 +02:00
Robin Appelman
d5fa2ec7c3 fix: log error when default getWrapperStorage would return null
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-20 14:26:01 +01:00
Benjamin Gaussorgues
5158bbf09b fix: avoid scanning a non existing directory
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-03-14 16:26:52 +01:00
Robin Appelman
ea8a774a0a fix: add some recrusive detection/prevention
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-08 14:20:14 +01:00
Ferdinand Thiessen
27642d3e6d fix: Enforce forbidden filename characters on backend
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-02-28 22:19:25 +01:00
Julius Härtl
22eab7ba36 fix: Throw instead of yielding nothing when listing local directories
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-02-23 16:08:09 +01:00
Robin Appelman
e9d97a568f use OCP\Server
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-12 16:39:00 +01:00
Robin Appelman
7a91abb439 improve di performance for cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-09 13:28:30 +01:00
Lorenz Brun
a6f879e154 dav: fix wrong decoding of pluses in URLs
PHP's urldecode function does not decode URLs according to RFC 3986, but
according to the HTML 4.01 query parameter
encoding. This results in pluses being wrongly decoded to spaces even
though they should not be decoded at all.

Use rawurldecode instead, which follows RFC 3986 properly.

This fixes an issue where files on DAV shares containing pluses were
incorrectly decoded to spaces.

Fixes: #15849
Signed-off-by: Lorenz Brun <lorenz@brun.one>
2024-01-31 13:26:04 +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
Benjamin Gaussorgues
cb4e367a22 Merge pull request #40935 from nextcloud/local-case-insensitive
add some support for rename on case insensitive local filesystems
2023-11-15 13:58:44 +01:00
Robin Appelman
8418fcfedf add some support for rename on case insensitive local filesystems
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-10-20 15:03:11 +02:00
Robin Appelman
460344336e optimize cache jail creation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-10-19 19:27:00 +02:00
Hamid Dehnavi
ea06cf2f39 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +03:30
Robin Appelman
b11ca34bbd Merge pull request #40499 from nextcloud/known-mtime-wrapper
add wrapper for external storage to ensure we don't get an mtime that is lower than we know it is
2023-09-21 18:33:15 +02:00