Commit Graph

804 Commits

Author SHA1 Message Date
Robin Appelman 719db4cee9 use returned file id for object store copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-16 16:17:57 +00:00
Robin Appelman bb180a95bb add ICopyFromCache trait to expose existing implementation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-16 16:17:56 +00:00
Robin Appelman c727879073 adjust tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-15 17:51:34 +00:00
Robin Appelman ec0985ba68 fix search in nested jails
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-15 17:51:33 +00:00
Robin Appelman eb56b1d0bd fix cachjail searching for root
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-15 17:51:32 +00:00
Robin Appelman 046638abeb do cachejail search filtering in sql
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-15 17:51:32 +00:00
James Letendre 74d90d0165 Fix failing tests
Signed-off-by: James Letendre <james.letendre@gmail.com>
2021-02-02 20:52:20 +00:00
James Letendre b65b2bbf55 Add web identity provider to S3 connection chain
Signed-off-by: James Letendre <james.letendre@gmail.com>
2021-02-02 20:52:18 +00:00
James Letendre 5750d79181 Replace defaultProvider with explicit calls to exclude user home directory lookup
Signed-off-by: James Letendre <james.letendre@gmail.com>
2021-02-02 20:52:16 +00:00
James Letendre c9a724829a Resolves #24699, Support ES2 and ECS instance providers for S3 buckets
Signed-off-by: James Letendre <james.letendre@gmail.com>
2021-02-02 20:52:13 +00:00
Julius Härtl 18e2e86b95
Avoid template creators being registered multiple times
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-02-02 19:36:31 +01:00
Julius Härtl 222d8e6c1a
Use proper path for scanner
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-29 09:40:46 +01:00
Julius Härtl 0d384dedaa
Obtain the user language from the passed in user id
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-29 08:56:32 +01:00
Julius Härtl 39a4b1c401
Normalize compared path to avoid renaming to the same directory
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-29 08:43:17 +01:00
Julius Härtl 6c1b357973
Move TemplateProvider registration to boot context and make template type registration lazy
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-28 12:00:21 +01:00
Julius Härtl 0111381529
Only create template directory if it is present in the default skeleton
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-28 12:00:20 +01:00
John Molakvoæ (skjnldsv) 4f90766ba3
Skip template picker if none available
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-01-28 12:00:20 +01:00
Julius Härtl 7e6d69d166
Add templatedirectory config value to let admins have their custom templates by default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-28 12:00:20 +01:00
John Molakvoæ (skjnldsv) 78e114ed72
Add template picker
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-01-28 12:00:18 +01:00
Julius Härtl 4974404774
files: Create files from template API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-28 11:59:46 +01:00
Robin Appelman d182043e83
explicitly set permissions on newly created folders
this works around any `umask` that might be set and limiting the folder permissions

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-20 17:15:57 +01:00
Johannes Leuker ac88bcbd5f Add 'allow Symlinks' as an option to config.php
Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
2021-01-12 10:38:39 +01:00
Morris Jobke 24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-11 13:14:41 +01:00
Christoph Wurst 8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +01:00
Robin Appelman 205386b24e
ignore files that have no read permissions during scanning
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-06 17:27:31 +01:00
Julius Härtl 98560c80ea
Properly handle result when copying with failure and throw in tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-05 09:20:35 +01:00
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +01:00
Christoph Wurst 73c7d0dc81
Bump icewind/streams from 0.7.1 to 0.7.2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-29 09:07:36 +01:00
Roeland Jago Douma adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
Unify links to php.net
2020-12-22 09:53:31 +01:00
Julius Härtl 5094e29ebd
Merge pull request #24594 from kofemann/dcache 2020-12-22 09:26:07 +01:00
Tigran Mkrtchyan 4f2dc18f58 storage: update IStorage#file_put_contents docs to match usage
The current phpdoc of IStorage#file_put_contents doesnt corresponds to
it's actual usage in code, e.g.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2020-12-21 19:04:18 +01:00
Roeland Jago Douma 4973f9b952
Merge pull request #24715 from nextcloud/bug/noid/limit-get-incomplete-to-1
Limit getIncomplete query to one row
2020-12-21 09:15:10 +01:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Daniel Kesselberg e0e76bb784
Limit getIncomplete query to one row
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-12-15 21:42:26 +01:00
Tigran Mkrtchyan f3513f3fe4 files: Local#writeStream should use it's own file_put_contents
The OC\Files\Storage\Local#writeStream use system provided file_put_contents.
However, it overrides file_put_contents, thus expects that the default behaviour
can be different.

Use Local#file_put_contents in writeStream to benefit from class specific functionality.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2020-12-07 18:11:40 +01:00
Roeland Jago Douma 6f4d3edb5e
Merge pull request #24113 from nextcloud/extend-cache-events
extend cache events
2020-12-02 19:48:20 +01:00
Robin Appelman aef1cdba03
code style and dispatchTyped
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-12-02 16:15:02 +01:00
aler9 ac0c7a8fe0 Fix file size computation on 32bit platforms
Signed-off-by: aler9 <46489434+aler9@users.noreply.github.com>
2020-12-02 12:05:14 +01:00
Robin Appelman 88f35d52d2
rename cache event to follow new naming standards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-26 15:39:46 +01:00
Robin Appelman 23fb497ff5
extend cache events
- adds cache remove event
- expose storage id in event
- emit events during cache move

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-26 15:22:03 +01:00
Robin Appelman 9d4848e863
use in objectstore copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-24 15:16:58 +01:00
Joas Schilling cffad62771
Empty string is returned as null, but empty string in file cache is the root and exists
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:35:43 +01:00
Joas Schilling 8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 12:28:17 +01:00
John Molakvoæ 72545ffd07
Merge pull request #23937 from nextcloud/bugfix/noid/files-ocdb
Use query builder instead of OC_DB in OC\Files\*
2020-11-09 11:58:36 +01:00
Morris Jobke 28464f71a2
Merge pull request #23982 from nextcloud/fix/quota-storage-getsize
Make sure root storage is valid before checking its size
2020-11-09 11:03:25 +01:00
Morris Jobke 005a132938
Merge pull request #23741 from Ashod/lock-leak
Unlock when promoting to exclusive lock fails
2020-11-09 11:00:46 +01:00
Joas Schilling c07720de77
Use query builder instead of OC_DB in OC\Files\*
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 09:05:15 +01:00
John Molakvoæ (skjnldsv) 6a453ac184
Make sure root storage is valid before checking its size
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-11-09 08:49:30 +01:00
Roeland Jago Douma a5fa9604ba
Merge pull request #23923 from nextcloud/bugfix/oci/fix-greatest-order-for-oracle
Fix greatest/least order for oracle
2020-11-07 16:55:13 +01:00
Ashod Nakashian a66fb45c0b Unlock when promoting to exclusive lock fails
In certain cases changeLock to EXCLUSIVE fails
and throws LockedException. This leaves the
file locked as SHARED in file_put_contents,
which prevents retrying (because on second
call file_put_contents takes another SHARED
lock on the same file, and changeLock doesn't
allow more than a single SHARED lock to promote
to EXCLUSIVE).

To avoid this case, we catch the LockedException
and unlock before re-throwing.

Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-07 10:31:26 -05:00