Commit graph

11165 commits

Author SHA1 Message Date
Joas Schilling
96c8e0dad3
Apply changes from master's update to 3.1.3
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-15 19:07:11 +01:00
Joas Schilling
d6d4cbbf9f
Allow NULL as well for limit, not integer only
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-15 19:01:46 +01:00
Joas Schilling
fd30500a92 Fix updating with apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-11 13:45:54 +00:00
Côme Chilliet
5041b727b1
Merge pull request #29520 from nextcloud/backport/29479/stable21
[stable21] Fix images on php 8.0
2021-11-08 11:57:23 +01:00
John Molakvoæ
5b89d34397
Revert "[21] tell mysql to ignore the sort index for search queries" 2021-11-04 11:10:46 +01:00
Côme Chilliet
dde1880be7
Merge branch 'stable21' into backport/29479/stable21
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-04 09:21:48 +01:00
John Molakvoæ
07c20b4f22
Merge pull request #29322 from nextcloud/mysql-search-ignore-index-21 2021-11-04 09:00:16 +01:00
Côme Chilliet
23aa60bb8d
Fix resource usages in OC_Image
This makes sure using resource or GdImage (PHP>=8) behaves the same.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-02 11:49:13 +01:00
Sijmen Schoon
43e829a93e Move query outside the loop and reduce chunk size to 1000
This involved changing CacheQueryBuilder\whereParentIn to take a
parameter name, renaming the function accordingly.

Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
2021-11-01 11:27:36 +00:00
Sijmen Schoon
bb198c635f Limit parameter count per query in Cache.removeChildren
Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
2021-11-01 11:27:36 +00:00
MichaIng
e250aef6b4
Merge pull request #29416 from nextcloud/backport/27440/stable21
[stable21] Handle files with `is_file` instead of `file_exists`
2021-10-30 00:19:35 +02:00
Carl Schwan
00a9b0c1db Fix permissions when copying from ObjectStorage
Make sure that when a user copy a file from a directory they don't have
all permissions to a directory where they have more permissions, the
permissions are correctly set to the one from the parent taget folder.

This was caused by the ObjectStoreStorage::copyFromStorage using
the jailed storage and cache entry instead of the unjailed one like other
storages (the local one).
Steps to reproduce

+ Use object storage
+ Create a groupfolder with one group having full permission and another one
  who can just read files.
+ With an user who is in the second group, copy a file from the groupfolder to
  the home folder of this user.
+ The file in the home folder of the user will be read only and can't be deleted
  even though it is in their home folder and they are the owner. In oc_filecache,
  the permissions stored for this file are 1 (READ)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-28 12:55:53 +00:00
Robin Appelman
99ba96524e
more reliable return value for Watcher::checkUpdate
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-26 14:45:08 +02:00
Robin Appelman
f18a76fec9
s3 external storage listing rework
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-26 14:41:46 +02:00
acsfer
eea1c23719 Handle files with is_file instead of file_exists
Should fix things like `fread(): read of 8192 bytes failed with errno=21 Is a directory`
2021-10-23 09:28:25 +00:00
Christoph Wurst
48d97fa865 Make the route name error more helpful
As a developer I have no clue what "Invalid route name" means. If the
exception gives me a hint I might find it easier to figure out why my
route triggers this error.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-22 20:38:58 +00:00
Carl Schwan
ec8b2a90e6 Fix security issues when copying groupfolder with advanced ACL
Using advanced ACL, it is possible that an user has access to a
directory but not to a subdirectory, so the copying use
Common::copyFromStorage instead of Local::copyFromStorage.

Fix https://github.com/nextcloud/groupfolders/issues/1692

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-21 16:34:46 +00:00
John Molakvoæ
6b0bdf192c
Merge pull request #29289 from nextcloud/backport/28768/stable21 2021-10-21 09:32:32 +02:00
John Molakvoæ
1493321401
Merge pull request #29182 from nextcloud/backport/29028/stable21 2021-10-19 11:11:20 +02:00
Joas Schilling
2f6bd56c93
Fix app upgrade
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-19 08:47:52 +02:00
Robin Appelman
5002bf9cc1
tell mysql to ignore the sort index for search queries
mysql really likes to pick an index for sorting if it can't fully satisfy the where
filter with an index, since search queries pretty much never are fully filtered by index
mysql often picks an index for sorting instead of the *much* more useful index for filtering.

To bypass this, we tell mysql explicitly not to use the mtime (the default order field) index,
so it will instead pick an index that is actually useful.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-18 18:05:48 +02:00
Robin Appelman
7f272dd98f
allow specifying index hints for mysql search queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-18 18:03:34 +02:00
acsfer
f57bbaf146 Simplify :) 2021-10-18 08:02:44 +00:00
acsfer
aeb0ad8cea Replace file_exists() method by is_file() 2021-10-18 08:02:44 +00:00
acsfer
0c1ccde7d2 Get filesize() if file_exists()
Should make sense.
2021-10-18 08:02:44 +00:00
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
MichaIng
d2a71ca010
Merge pull request #29203 from nextcloud/backport/26688/stable21
[stable21] Add proper message to created share not found
2021-10-14 15:08:10 +02:00
Joas Schilling
7aa440b51d
Merge pull request #29197 from nextcloud/backport/29020/stable21
[stable21] Keep group restrictions when reenabling apps after an update
2021-10-13 22:24:18 +02:00
Joas Schilling
7f4b3fb68d
Keep group restrictions when reenabling apps after an update
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-13 14:12:32 +02:00
Joas Schilling
fd4ff58d62
Fix translated app details
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-13 13:32:30 +02:00
John Molakvoæ (skjnldsv)
098d918baf Add proper message to created share not found
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-10-13 09:44:51 +00:00
Vincent Petry
e229cd3d53
Merge pull request #29130 from nextcloud/backport/27886/stable21
[stable21] Keep pw based auth tokens valid when pw-less login happens
2021-10-13 08:39:27 +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
Bjoern Schiessle
1237d64bdb add 'supported'-label to all supported apps, also if they are not downloaded yet
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2021-10-12 11:47:33 +00:00
Vincent Petry
2bf6270ef5
Merge pull request #29037 from Hinyka/stable21
[stable21] Fix Lots of Error: file_exists(): open_basedir restriction in effect
2021-10-12 09:11:18 +02:00
Julius Härtl
e59f90d6ba
Merge pull request #29134 from nextcloud/backport/28907/stable21 2021-10-11 22:23:14 +02:00
MichaIng
6039a43d13
Merge pull request #29164 from nextcloud/backport/29062/stable21
[stable21] Don't further setup disabled users when logging in with apache
2021-10-11 14:38:52 +02:00
Joas Schilling
e3f59fe201
Don't further setup disabled users when logging in with apache
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-11 13:11:45 +02:00
Julius Härtl
b2566e3dda Tokens without password should not trigger changed password invalidation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-10-11 09:33:18 +00: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
Tobias Assmann
4a174617eb
add spaces around operators
Signed-off-by: Tobias Assmann <tobias.assmann@ecsec.de>
2021-10-08 08:08:28 +02:00
Tobias Assmann
4fd1b09a60
draft to prevent the invalidation of pw based authn tokens on a pw less login
Signed-off-by: Tobias Assmann <tobias.assmann@ecsec.de>
2021-10-08 08:08:28 +02:00
Julien Veyssier
1bf46f6610 consider some config keys under 'objectstore_multibucket' as sensitive
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2021-10-06 07:52:40 +00:00
acsfer
cd7eb98912
Fix path of file_get_contents 2021-10-04 21:10:53 +02:00
Karel Hink
30905d2340 backport of #28263
Signed-off-by: Karel Hink <info@karelhink.cz>
2021-10-02 13:51:42 +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