Commit Graph

1406 Commits (feat/database/query-result-fetch-associative-fetch-num)

Author SHA1 Message Date
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
Côme Chilliet dc347b39c1
Merge pull request #40501 from nextcloud/fix/fix-int-size-in-files-scanner
Store size in int|float for 32bit support
2023-09-25 16:32:32 +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 eab8dd3ca0 use multipart copy for s3
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-20 17:28:48 +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
Côme Chilliet 5090848b25
Store size in int|float for 32bit support
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-19 13:43:01 +07:00
Simon L 7bba5ec71e
Merge pull request #40203 from lhsazevedo/fix/mimetype-40064 2023-09-16 21:17:24 +07:00
Julius Härtl 7f958e81d3
fix: Pass parent to NonExistingFile instances
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-13 10:28:28 +07:00
Benjamin Gaussorgues 003d0dec93 Detect aborted connection in OC\Files\View and stop writing data to the output buffer
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-09-07 09:32:32 +07:00
Julius Härtl 13b9dd2267 fix: Only read unencrypted_size when file is actually encrypted
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-06 07:25:28 +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 5ac0e9b63b
reuse isValidPath from Filesystem
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 18:42:50 +07:00
Robin Appelman baf8d2e1d0
make LazyFolder::get not load the real folder if we know the path
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 18:42:49 +07:00
Robin Appelman 9055fef5ef
add IFileInfo::getParentId
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 18:42:49 +07:00
Robin Appelman e718cbc661
make Node::getParent lazy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 18:42:48 +07:00
Robin Appelman 0232eec2cf
allow passing more info to lazy folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 18:42:47 +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
Lucas Azevedo c587f684bd Wrap mimetype insert and getLastInsertId in a transaction
Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
2023-09-04 08:02:35 +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
Lucas Azevedo 5de021cb9a fix(mimetype): Remove unnecessary transaction when storing a mime type
Fixes #40064.

This could be fixed by adding a rollback and starting a new transaction
before the SELECT query, but in this case that would have the same
effect as not using one.
See https://dev.mysql.com/doc/refman/8.0/en/innodb-autocommit-commit-rollback.html
and https://www.postgresql.org/docs/7.1/sql-begin.html#R1-SQL-BEGIN-1

Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
2023-09-01 14:20:21 +07:00
John Molakvoæ 750a9f2c4a
fix: prevent sharing permissions on user root folder
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-09-01 13:53:41 +07:00
Robin Appelman 4711c775b8
Merge pull request #36068 from nextcloud/gf-encryption-fix
extend fix-key-location to handle cases from broken cross-storage moves
2023-09-01 13:01:04 +07:00
Thomas Citharel 3f28fc58aa fix(s3): fix handling verify_bucket_exists parameter
If 'verify_bucket_exists' is set to false in the config.php s3 configuration, it's supposed to avoid
verifying that the bucket exists. However empty(falsy) will  always return true, so this condition
would not work.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-08-31 21:36:03 +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
John Molakvoæ b11532ce56
Merge pull request #39958 from nextcloud/dav-permissions-perf 2023-08-22 19:14:53 +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 e98e8f10c9 improve performance of calculating dav permissions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 14:09:03 +07:00
Robin Appelman 9ea03a9534 reuse dependencies from wrapped cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 11:14:52 +07:00
Julius Härtl 45595a8417
Merge pull request #39481 from nextcloud/fix/transfer-ownersip 2023-08-17 13:23:04 +07:00
Anna Larch 556f29bef5 fix: don't emit Hooks when hookpaths are empty
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-08-17 09:32:14 +07:00
Robin Appelman e73889a240 cleanup di for share permissions wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-16 15:25:05 +07:00
Ferdinand Thiessen 9c04c07622 fix: Prevent PHP warnings when optional CacheEntry attributes are unset
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-08-16 14:12:51 +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
Robin Appelman 658aed27ea select the fileid first when looking for incomplete files
this seems to improve mariadbs index selection

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-14 18:08:01 +07:00
Daniel 2ea6c5364d
Merge pull request #39644 from nextcloud/fix/noid/copy-delete-fallback-for-files
fix: copy-and-delete fallback should use unlink
2023-08-14 12:29:40 +07:00
John Molakvoæ b27a2e9ec5
Merge pull request #39698 from joshtrichards/invalid-source-storage-path-catch 2023-08-05 12:17:33 +07:00
John Molakvoæ 7b7d1e3c09
fix: simplify `sourceData` check
Co-authored-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2023-08-05 12:05:36 +07:00
Joas Schilling 44b4c16a09
Merge pull request #39605 from nextcloud/bugfix/noid/final-events-cleanup
fix!: Final round of moving to IEventDispatcher
2023-08-04 10:39:57 +07:00
Josh Richards deecb48e54
Catch more invalid cache source storage paths
OC\Files\Cache\Cache::get can return string|false|null, not just string|false.

- nextcloud/server#26270 added handling of false, but null is needed too.
- Well, or we change the default $resullt to false, but I'm not sure if that has other ramifications and the real need here is to simply catch situations where the cache source storage path is not valid for whatever reason

Related: nextcloud/server#19009

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2023-08-03 09:53:46 +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
Tobias Zimmerer 23f85b5ac2 fix(s3): add SSE-C parameters to headObject call
Signed-off-by: Tobias Zimmerer <3228193+ir0nhide@users.noreply.github.com>
2023-07-30 22:54:58 +07:00
Robin Appelman fda820a64d
expose MovableMount in public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-28 14:42:09 +07:00
Joas Schilling 3962cd0aa8
fix!: Move getEventDispatcher usage to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:22 +07:00
Joas Schilling 44a0a62107
fix: Move Node HookConnecter events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:53 +07:00
Robin Appelman 31f1ff87d0
Merge pull request #39367 from nextcloud/s3-fopen-exception
handle more exceptions in AmazonS3::fopen
2023-07-20 19:32:03 +07:00
Robin Appelman c912a3f0f6
Merge pull request #38860 from nextcloud/scanner-change-summary
add summary of detected changes to files:scan output
2023-07-20 18:37:07 +07:00
Julius Härtl 77f249726d
Merge pull request #38934 from nextcloud/bugfix/noid/ssec-multipart 2023-07-20 11:00:08 +07:00