Commit Graph

337 Commits (08e62bece99ab59624b363aec64400a499991561)

Author SHA1 Message Date
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 +07: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 +07:00
Joas Schilling 64d32abb48
fix(CI): Suppress psalm UndefinedClass
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-18 09:24:11 +07: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 +07: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 +07: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 +07: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 +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
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 +07: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 +07:00
Robin Appelman ea8a774a0a fix: add some recrusive detection/prevention
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-08 14:20:14 +07: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 +07: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 +07:00
Robin Appelman e9d97a568f
use OCP\Server
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-12 16:39:00 +07:00
Robin Appelman 7a91abb439 improve di performance for cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-09 13:28:30 +07: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 +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
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 +07: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 +07:00
Robin Appelman 460344336e
optimize cache jail creation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-10-19 19:27:00 +07: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 +07:00
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 +07:00
Robin Appelman ef87ff1848
Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_private
Refactor "substr" calls in lib/private to improve code readability
2023-09-21 16:34:27 +07:00
Robin Appelman 5bf34979fe add wrapper to ensure we don't get an mtime that is lower than we know it is
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-19 13:58:15 +07:00
Julius Härtl 88a96e4db7 fix: Only store unencrypted_size if path should be encrypted
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-06 07:25:28 +07:00
Robin Appelman 64f62f7cfd
Merge pull request #39863 from nextcloud/sharing-mask-wrapper
move share permission logic to storage wrapper
2023-09-04 14:05:14 +07:00
Simon L 489a57e9a3
Merge pull request #39707 from nextcloud/bugfix/39706/local-ext-storage-unavailable-mode 2023-09-04 12:05:36 +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
Vincent Petry 8d1a3daa3f Allow ext storage Local to go unavailable
Whenever an external storage of type Local points at a non-existing
directory, process this as a StorageNotAvailable instead of returning
404.

This makes desktop clients ignore the folder instead of deleting it when
it becomes unavailable.

The code change was limited to external storages to avoid issues during
setup and with the default home storage.
Signed-off-by: Vincent Petry <pvince81@yahoo.fr>
2023-08-29 11:04:31 +07:00
Robin Appelman b6c3507aa0 only determine quota_include_external_storage once for quota wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 14:25:28 +07:00
Robin Appelman a031bc4788 more share permission logic to storage wrapper
this way we only have to determine the share permissions once

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-14 18:17:27 +07:00
Daniel Kesselberg f1d4f7c7e4
fix: copy-and-delete fallback should use unlink
because rmdir does not work for files.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-07-31 21:41:25 +07:00
Daniel Kesselberg b4ff557b8c fix(storage): fallback to copy and unlink when rename fails
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-07-31 18:54:21 +07:00
Hamid Dehnavi d0b20534b9 Refactor "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-07-07 04:54:20 +07:00
Richard Steinmetz c4eccbb304
fix(sse): don't update uncached files
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-07-04 12:42:29 +07:00
Robin Appelman 493e151be0
dav: clean path before putting it in the statcache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-06-23 14:39:17 +07:00
Robin Appelman 279822c217
implement optimized getDirectoryContent for DAV
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-06-22 16:34:32 +07:00
Dominik Fuchß e3f6a13e14 Fix deprecated method call
Signed-off-by: Dominik Fuchß <develop@fuchss.org>
2023-06-13 10:31:33 +07:00
Dominik Fuchß a4a57409db Changes after code review.
Signed-off-by: Dominik Fuchß <develop@fuchss.org>
2023-06-13 10:31:33 +07:00
Dominik Fuchß c3ba871f36 Add config variable for curl timeout
Add the config variable for curl calls ("remote_curl_timeout"). E.g., needed for nextcloud federation.

Signed-off-by: Dominik Fuchß <develop@fuchss.org>
2023-06-13 10:31:33 +07:00
Robin Appelman 9f1d497a0b
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
Refactors "strpos" calls in  lib/private to improve code readability.
2023-06-01 23:10:00 +07:00
Lorenzo Tanganelli 6b55e92e33
invert elseif on rmdir for local storage
Signed-off-by: Lorenzo Tanganelli <lorenzo.tanganelli@hotmail.it>
2023-05-24 08:22:50 +07:00
Côme Chilliet 8362eea14e
Merge pull request #38196 from nextcloud/fix/fix-32bits-freespace-and-sizes
Get rid of more int casts in file size manipulations
2023-05-15 17:05:46 +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
Julius Härtl 8cab1d73ac
Merge pull request #37621 from nextcloud/enh/lock-readable-path 2023-05-13 13:11:37 +07:00
Côme Chilliet a90581b405
Get rid of more int casts in file size manipulations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-11 12:46:16 +07:00
Julius Härtl 11c5bc6a2a
fix: Wrap filesystem LockedExceptions for holding the readable path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-05-02 19:40:27 +07:00
Côme Chilliet 546d94c3ec
Fix file_get_content signatures to make it clear it can return false
In File::getContent, which must return a string, throw an Exception
 instead of returning false.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 09:56:05 +07:00
Robin Appelman d60172567f
Merge pull request #37818 from nextcloud/dav-ext-storage-log
debug log requests made by dav external storage/shares
2023-04-25 14:12:57 +07:00
Robin Appelman 05dc96f60d
debug log requests made by dav external storage/shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-24 17:13:20 +07:00