Daniel
1ea652d611
Merge pull request #29159 from nextcloud/backport/24185/stable21
...
[stable21] Properly handle folder deletion on external s3 storage
2021-10-15 11:36:56 +02:00
Vincent Petry
5735a55509
Merge pull request #29080 from nextcloud/path-prefix-filter-21
...
[21] generate a better optimized query for path prefix search filters
2021-10-13 08:37:28 +02:00
Robin Appelman
916a838873
[21] generate a better optimized query for path prefix search filters
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-12 15:55:57 +02:00
Julius Härtl
df3ed040e4
Make sure that a empty directory can still be deleted when copied from another storage
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-10-11 08:01:08 +00:00
Daniel Kesselberg
b77b1d6bbd
explicitly close source stream on encryption storage
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-10-08 14:30:27 +02:00
Daniel Kesselberg
98d3836650
explicitly close source stream on local storage
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-10-08 14:30:27 +02:00
Vincent Petry
9722bb5c54
Fix psalm issue in Encryption stream
...
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-10-08 12:15:04 +02:00
Robin Appelman
4180ca7a0b
handle case where storage can't be created in getStorageRootId
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-09-30 13:21:40 +02:00
MichaIng
ea39319d2e
Merge pull request #28905 from nextcloud/backport/26832/stable21
...
[stable21] explicitly close source stream on object store upload even if count…
2021-09-24 13:35:41 +02:00
Pauli Järvinen
61acaf1fbd
Support seeking also from the end of file on S3 storage
...
The PR https://github.com/nextcloud/server/pull/20033 added support
for `fseek` for the S3 storage backend. However, the seek mode SEEK_END
was left out that time. This PR fills this gap.
Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
2021-09-20 18:13:18 +00:00
Daniel Kesselberg
dd9a08fa82
explicitly close source stream on object store upload even if countwrapper isn't needed
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-09-20 18:27:12 +02:00
Jasper Knockaert
bb092dd7cc
fix even more brackets
...
Signed-off-by: Jasper Knockaert jasper@knockaert.nl
2021-09-03 13:40:42 +00:00
Jasper Knockaert
c1dcd06fe1
fix brakcets
2021-09-03 13:40:42 +00:00
Jasper Knockaert
5f9663d2c8
consolidation of boolean expression
2021-09-03 13:40:41 +00:00
Jasper Knockaert
82482adb48
avoid fread on directories and unencrypted files
...
Reworking the logic in order to first check the filecache and only then reading the fileheader.
This in order to solve #21578 .
2021-09-03 13:40:40 +00:00
Vincent Petry
2032ca7457
Unregister enc stream wrapper for any exception
...
This prevents side effects in tests by properly cleaning up
even with expected exceptions.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-08-26 14:20:04 +02:00
Robin Appelman
ca3a6251d2
better cleanup of user files on user deletion
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-12 18:16:51 +02:00
Robin Appelman
4c954e7dd1
fix Folder->getById() when a single storage is mounted multiple times
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-09 17:32:20 +00:00
Robin Appelman
a9fbd0b41b
dont apply jail search filter is on the root
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-07-29 14:22:38 +02:00
John Molakvoæ
218a96ebf9
Revert "[stable21] better cleanup of filecache when deleting an external storage"
2021-07-27 15:51:10 +02:00
John Molakvoæ
606b5fe154
Merge pull request #27205 from nextcloud/backport/26936/stable21
...
[stable21] better cleanup of filecache when deleting an external storage
2021-07-27 14:04:25 +02:00
Robin Appelman
feb640cd64
better cleanup of filecache when deleting an external storage
...
this way it can delete the cache entries even with per-user credentials
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-07-13 08:54:30 +02:00
Julius Härtl
c16d5b1077
Reset checksum when writing files to object store
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-01 15:36:07 +00:00
Julius Härtl
420d395947
Merge pull request #27415 from nextcloud/backport/26494/stable21
2021-06-14 09:48:41 +02:00
Julius Härtl
6e190b1a55
Merge pull request #27303 from nextcloud/backport/27062/stable21
...
[stable21] properly use limit and offset for search in Jail wrapper
2021-06-09 08:07:49 +02:00
Richard de Boer
9f3824b884
Check whether output buffering is active before turning it off
...
Before we just turned it off and @suppressed the error if ob was not active.
In PHP 8 this error is no longer suppressed, so try to not cause it at all.
Signed-off-by: Richard de Boer <git@tubul.net>
2021-06-07 21:33:53 +00:00
Richard de Boer
7e9d459fea
Fix functions taking optional parameters before required ones
...
PHP 8 shows deprecation warnings about this, see #25806
Removes the "default" values, as they actually are required parameters anyway.
Signed-off-by: Richard de Boer <git@tubul.net>
2021-06-07 21:33:52 +00:00
Robin Appelman
287edf0e61
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-06-04 15:43:16 +02:00
Robin Appelman
a21eb8d6d2
properly use limit and offset for search in Jail wrapper
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-05-31 12:28:12 +00:00
Florent
ede67149ea
Avoid reading ~/.aws/config when using S3 provider
...
When using S3 storage, we sometimes have open_basedir errors due to aws-sdk-php trying to read ~/.aws/config which is out of open_basedir restrictions.
Christoph Wurst already added csm=false config in #21406 but it wasn't enough, we also need to set use_arn_region=false, added in this commit.
Signed-off-by: Florent <florent@coppint.com>
2021-05-25 08:59:03 +00:00
Julius Härtl
80cda3b174
Fix log error when creating files from an empty template
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-05-19 07:03:27 +00:00
Julius Härtl
e2fffcda44
Fail when creating new files with an empty path
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-28 10:06:03 +00:00
Julius Härtl
dc8e819915
Properly handle creating the template directory in a subfolder ( fixes #25787 )
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-01 13:31:55 +00:00
Julius Härtl
89a19a338e
Get the parent directory before creating a file from a template
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-01 13:31:55 +00:00
Julius Härtl
fc2e09b667
Properly end iterating over the file once the target has been reached
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-03-30 19:22:47 +00:00
Roeland Jago Douma
d65ce19f6e
Merge pull request #26291 from nextcloud/backport/21484/stable21
...
[stable21] show better error messages when a file with a forbidden path is encountered
2021-03-26 10:44:43 +01:00
Morris Jobke
cf8be87e47
Log when a storage is marked as unavailable
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-03-25 16:10:28 +00:00
Robin Appelman
fdf7eb10a2
show better error messages when a file with a forbidden path is encountered
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-25 10:56:59 +00:00
Morris Jobke
ffb7c51ca6
Merge pull request #26257 from nextcloud/backport/26198/stable21
...
[stable21] Handle limit offset and sorting in files search
2021-03-24 17:32:36 +01:00
John Molakvoæ (skjnldsv)
e9fafce71b
Catch invalid cache source storage path
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-03-24 11:03:30 +00:00
Robin Appelman
d4381c0eac
handle ordering in folder search
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 13:41:18 +00:00
Robin Appelman
8551ee079d
folder filtering in sql
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 13:41:16 +00:00
Robin Appelman
277c0039f6
cleanup fileinfo creation
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 13:41:13 +00:00
Robin Appelman
c8679885f6
format
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 13:41:12 +00:00
Robin Appelman
423e1581e0
handle limit and offset in folder file search
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 13:41:12 +00:00
Robin Appelman
2500d296c5
only require user to be set in a query that handles tags
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 13:41:11 +00:00
Robin Appelman
d2245734d4
unify handling of Folder::search methods into "new" query objects
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 13:41:11 +00:00
Vincent Petry
0e5379a7b3
Merge pull request #26119 from nextcloud/backport/26003/stable21
...
[stable21] Add getID function to the simplefile implementation
2021-03-19 13:59:00 +01:00
Morris Jobke
c1c377f609
Merge pull request #26090 from nextcloud/backport/25722/stable21
...
[stable21] apply object store copy optimization when 'cross storage' copy is wit…
2021-03-17 20:09:50 +01:00
Morris Jobke
95ebe5e819
Merge pull request #26146 from nextcloud/backport/26013/stable21
...
[stable21] Return the fileid from `copyFromCache` and use it instead of doing an extra query
2021-03-17 20:03:58 +01:00