Commit graph

11153 commits

Author SHA1 Message Date
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
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
Louis Chemineau
fbf3645598 Prevent empty base URL during installation
Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-09-29 15:40:57 +00:00
blizzz
62a5d27eb7
Merge pull request #27203 from nextcloud/backport/27187/stable21
[stable21] Fix Oracle query limit compliance in Comments
2021-09-27 11:02:14 +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
Louis
1297b04d41 Use legacy execute method
Use legacy execute method instead of executeQuery introduced in 22

Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-09-23 12:45:23 +02:00
Joas Schilling
8e7eea935a Fix populating the array and closing the cursors
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-09-23 08:37:51 +00:00
Simounet
f325a4ae60 Fix Oracle query limit compliance in Comments
Signed-off-by: Simounet <contact@simounet.net>
2021-09-23 08:37:51 +00:00
blizzz
88858812c2
Merge pull request #28790 from nextcloud/backport/23065/stable21
[stable21] Fix null displayname crash as described in #21885
2021-09-23 10:20:59 +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
Vincent Petry
7aaf41d0f6 Fall back to full file for video previews
If the first 5 MB are not enough to grab a useful frame for the
thumbnail preview, fall back to reading the full file.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-09-20 09:32:34 +00:00
Daniel Kesselberg
32ee325887
Add email addresses to contacts menu
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-09-17 10:05:54 +02:00
Lukas Reschke
f416cacc64 Add database ratelimiting backend
In case no distributed memory cache is specified this adds
a database backend for ratelimit purposes.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-13 16:45:54 +02:00