Ferdinand Thiessen
b48ee2e924
fix: Harden files scanner for invalid null access
...
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-28 20:08:46 +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
Robin Appelman
7cb07bf306
test: add test for nested jail cross-storage move
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-10-10 15:16:12 +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
provokateurin
256a8d8903
test: Fix IStorage return types
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-26 17:29:48 +02:00
Louis Chemineau
22d5d29c01
fix(users): Don't crash if disabled user is missing in the database
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-23 10:40:38 +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
Côme Chilliet
cfca7e7911
fix(tests): Fix most obvious errors in ObjectStore tests
...
Some are still failing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-17 19:20:13 +02:00
Stephan Orbaugh
f25acfb799
Merge pull request #47986 from cfiehe/fix_move_on_same_bucket
...
perf(ObjectStoreStorage): Improve (slow) move on same object bucket
2024-09-17 16:35:19 +02:00
Côme Chilliet
22822d5e9b
fix: Fix other uses of removed Storage interface
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:11:36 +02:00
Christoph Fiehe
9597072ada
perf(ObjectStoreStorage): Improve (slow) move on same object bucket
...
This commit fixes the issue #47856 . When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage.
The behavior improves a lot with https://github.com/nextcloud/server/pull/46013 . However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder.
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
2024-09-16 15:11:09 +02:00
Christoph Wurst
49dd79eabb
refactor: Add void return type to PHPUnit test methods
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +02: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 +02:00
John Molakvoæ
d35c4eb911
Merge branch 'master' into jr-readdir-false-false
...
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-08-16 10:53:50 +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
Andy Scherzinger
1f7e2ba599
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +02: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
Robin Appelman
5aea3f4d76
make storage directory test be a bit less strict about mtimes
...
sometimes the clock ticks over during the test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-07 12:13:00 +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
Robin Appelman
ccf8843d9f
apply known mtime wrapper for external storages
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-19 13:58:35 +02: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 +02:00
Simon L
489a57e9a3
Merge pull request #39707 from nextcloud/bugfix/39706/local-ext-storage-unavailable-mode
2023-09-04 12:05:36 +02:00
Robin Appelman
e704470c79
update tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-31 22:37:10 +02: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 +02:00
Joas Schilling
ad12a740cb
fix!: Remove symfony EventDispatcherInterface from User
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 23:13:37 +02:00
Josh Richards
e7cbaf3ee3
Clean-up some remaining readdir calls with undesirable false evaluation potential
...
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2023-06-24 15:37:06 +02: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 +01:00
Robin Appelman
d8961ed10f
fix using FSEEK_END with SeekableHttpStream to get file size
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-15 17:23:16 +02:00
Robin Appelman
bd91c56539
get quota for user only when needed
...
always apply the wrapper but have the wrapper get the quota lazily only when an operation where quota is applied is performed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-01 19:32:24 +02:00
Robin Appelman
8238582e59
store unencrypted size in the unencrypted_size column
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-02 16:07:00 +02:00
Côme Chilliet
1809386862
Fix codestyle
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:27 +01:00
Côme Chilliet
61f7f13bd8
Migrate from ILogger to LoggerInterface where needed in the tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:26 +01:00
Vincent Petry
c92a0e4152
Normalize directory entries in Encoding wrapper
...
Directory entry file names are now normalized in getMetaData(),
getDirectoryContents() and opendir().
This makes the scanner work properly as it assumes pre-normalized names.
In case the names were not normalized, the scanner will now skip the
entries and display a warning when applicable.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-17 09:43:25 +01:00
John Molakvoæ
f4e4a85fcf
Merge pull request #27440 from nextcloud/is-file-handle
2021-10-23 11:18:52 +02:00
acsfer
dae769d082
Update Tests
2021-10-22 12:16:11 +02:00
Robin Appelman
294b218895
ci
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-15 15:35:12 +02:00
Daniel Kesselberg
e60a829b42
explicitly close source stream on local storage
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-09-21 17:41:59 +02:00
acsfer
11169c86f8
Tests update
2021-08-15 12:23:29 +02:00
Lukas Reschke
4b4971ab52
Merge pull request #24966 from nextcloud/jknockaert-patch-1
...
avoid fread on directories and unencrypted files
2021-04-06 13:45:10 +02:00
Robin Appelman
e5dc1a8085
Set umask before operations that create local files
...
this solves issues where "other php stuff" is messing with the umask
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 14:52:31 +01: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 +01:00
Joas Schilling
645f83121e
Cache the user backend info for 300s
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-02-15 10:36:08 +01:00
Jasper Knockaert
261966ace5
Update EncryptionTest.php
2021-01-05 21:45:50 +01:00
Jasper Knockaert
664e74a82e
2nd attempt to fix tests
2021-01-05 20:41:02 +01:00
Jasper Knockaert
87c640193b
attemtp to fix test
2021-01-05 19:09:16 +01:00
Morris Jobke
e6fca0a519
Fix code style
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-09 17:36:58 +02:00
Julius Härtl
74747163d6
Make sure tests cover the new mkdir behaviour on 0 quota
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-08 11:35:32 +02:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +02:00