Commit Graph

11223 Commits (a6e367ecbf19bd461817a4c62a89eeb85fff4daf)

Author SHA1 Message Date
Côme Chilliet 8f11994537 Always call flush() as getAllKeys() is broken
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-27 08:30:20 +07:00
John Molakvoæ 301ecd0fc0
Merge pull request #30660 from nextcloud/backport/29622/stable21 2022-01-20 10:22:22 +07:00
Julius Härtl b9e3fb02ff
Add hashed attribute column for indexed job existence check
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-01-18 15:16:40 +07:00
Louis 22fcd65717
Merge pull request #30633 from nextcloud/backport/30358/stable21
[stable21] Reset job disabling timer on adding the job again
2022-01-17 10:42:59 +07:00
Carl Schwan 396157af18 Fix psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-14 14:16:59 +07:00
Carl Schwan 73e402f715 Add helper method in Wrapper
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-14 14:16:54 +07:00
John Molakvoæ 6b94630f44
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-01-14 08:39:37 +07:00
Carl Schwan 2f10bc14f7
Fix idn emails not working in shares
And add check before sending email that email address is valid

Fix #30595

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 17:19:28 +07:00
Louis Chemineau 67ccb325ef Update lib/private/BackgroundJob/JobList.php
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-12 17:44:33 +07:00
Julius Härtl 04e8861192 Reset job disabling timer on adding the job again
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-01-12 15:14:51 +07:00
Joachim Bauch 3ad763cf18 Prevent loading images that would require too much memory.
For most image formats, the header specifies the width/height.
PHP allocates an image object from that size, even if the actual
image data is much smaller. This image object size is not limited
by the limit configured in PHP.

The memory limit can be configured through "config.php" setting
"preview_max_memory" and defaults to 128 MBytes which should be
enough for most images without filling up all memory.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2022-01-11 14:48:27 +07:00
Vincent Petry 79d26e4d7f Fix fail when keys/files folder already exists
Fixes an issue with transfer ownership in move mode where the folder
"files_encryption/keys/files" already exists.

Instead of failing, its existence is checked before calling mkdir.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-01-11 10:15:40 +07:00
John Molakvoæ cf46808a7f
Merge pull request #30488 from nextcloud/backport/29780/stable21 2022-01-07 13:11:26 +07:00
MichaIng 768bf3c59a [stable22] Remove iconv from dependencies and tests
which is not used anymore since: https://github.com/nextcloud/server/pull/29470

Signed-off-by: MichaIng <micha@dietpi.com>
2022-01-07 10:19:13 +07:00
Joas Schilling 67a43a6ad4
Run migrations fully when reenabling an app
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-07 08:50:31 +07:00
John Molakvoæ dbdc814e81
Merge pull request #29963 from nextcloud/backport/29951/stable21 2022-01-07 08:48:20 +07:00
John Molakvoæ 064f2615d7
Merge pull request #29325 from nextcloud/backport/28541/stable21 2022-01-07 08:46:22 +07:00
MichaIng 92744f3047
Merge pull request #30248 from nextcloud/backport/30245/stable21
[stable21] Only wildcard search if enumeration is allowed
2021-12-20 18:41:53 +07:00
Robin Appelman f6024a895c
also use case sensitive like when searching in a folder
this case was missed from https://github.com/nextcloud/server/pull/29080

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-14 17:49:48 +07:00
Côme Chilliet e34ec33199
Avoid assignment in if clause
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 11:20:13 +07:00
Côme Chilliet 07997131d3
Fix typing problems in OC_Image
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 11:20:13 +07:00
Côme Chilliet 3f10cf8996
Avoid calling image* methods on boolean
This avoids fatal errors on PHP>=8, and warnings on older versions.
Log should also be clearer.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 11:20:13 +07:00
Louis Chemineau 565da24b4f Fix backport
Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-12-13 15:36:45 +07:00
Joas Schilling 846929b90d Make psalm more happy
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:26:22 +07:00
Joas Schilling 9da9a53166 Fix docs to make Psalm happier
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:26:22 +07:00
Joas Schilling ae068fb47a Convert strict_search to wildcard property and add psalm docs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:26:22 +07:00
Joas Schilling 749935e91b Limit more contact searches
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:26:22 +07:00
Joas Schilling 448ee8e30d Only limit search in the system address book
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:26:22 +07:00
Joas Schilling 18e665364a Only wildcard search if enumeration is allowed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:26:21 +07:00
Vincent Petry 65d4d30251 Check resource before closing in encryption wrapper
In case of error there is no guarantee that $source or $target is set or
is a resource when handling an error.

Without this fix, there's a risk that fclose will fail and the actual
exception will not be thrown, making it impossible to find out about the
root cause.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-12-10 00:10:44 +07:00
Louis f41c1fffff
Merge pull request #30056 from nextcloud/backport/29735/stable21
[stable21] find users for background scan one by one
2021-12-08 18:06:00 +07:00
John Molakvoæ fda86f8c8c
Merge pull request #29834 from nextcloud/carl/bugfix/file-search-21 2021-12-06 14:51:55 +07:00
Robin Appelman bd677f6741 background scan the source storage when a background scan on a storage jail is triggered
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-02 20:00:45 +07:00
Joas Schilling cabc6eaec6 Fix log_query config flag
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 09:41:33 +07:00
Arthur Schiwon 26c66d210d ensure that factoryClass exisits before instantiation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-12-01 08:27:56 +07:00
Christoph Wurst 56fb21769f Include previous execption for repair steps that don't exist
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-30 12:03:51 +07:00
Christoph Wurst bb91d5bd69 Let repair step query exceptions bubble up
And hide the type error caused by a constructor call with missing
arguments.

`new $repairStep();` only works for the rare case that no arguments are
required. Anything else will throw. Then we previously hid the trace of
the more important query exception.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-30 12:03:51 +07:00
Christoph Wurst 603d623d54 Interpolate the log message also for logged exceptions
According to PSR-3 the log message can have placeholders that are
replaced from the context object. Our logger implementation did that for
all PSR-3 logger methods. The only exception was our custom `logException`.

Since PsrLoggerAdapter calls logException when an exception key is
present in the context object, log messages were no longer interpolated.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-29 15:55:00 +07:00
Carl Schwan 8f9d1b31df
Fix search results filtering
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-11-26 16:30:47 +07:00
MichaIng 6d8cf37f06
Merge pull request #29907 from nextcloud/backport/29902/stable21
[stable21] Check for invalid characters before trimming
2021-11-26 14:22:04 +07:00
MichaIng e5daae9101
Merge pull request #29803 from nextcloud/backport/29632/stable21
[stable21] fix imagecreatetruecolor() error
2021-11-25 17:14:08 +07:00
Joas Schilling f700abc889 Check for invalid characters before trimming
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-25 15:34:35 +07:00
MichaIng 9db07032d5 Use pre-v22 query commands
Signed-off-by: MichaIng <micha@dietpi.com>
2021-11-24 14:47:23 +07:00
Robin Appelman a3dc399e2f 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-11-24 14:47:23 +07:00
Vincent Petry 264b329aaf Type hint in IpAddress
Signed-off-by: Vincent Petry <vincent@nextcloud.com>

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2021-11-23 10:28:20 +07:00
Vincent Petry d9a5f2867e Improve normalizer detecting IPv4 inside of IPv6
The subnet for an IPv4 address inside of IPv6 is now returned in its
IPv4 form.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-23 10:28:20 +07:00
Vincent Petry 87af149292 Fix getting subnet of ipv4 mapped ipv6 addresses
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-23 10:28:20 +07:00
Christoph Wurst d0689fb707 Do not print verbose info about app updates if there are none
This is cosmetical but if you have a large number of apps installed then
you'll see a wall of text during the server and app upgrade when it
tries to update each app via the app store. In may cases nothing will be
updated. For those boring cases we can hide the verbose info, but show
when occ is run with -v. Any actual update will still print a few lines.
Those are the important ones for the admin.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-22 20:54:58 +07:00
szaimen 9e2775deb7 fix imagecreatetruecolor() error
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-11-19 20:17:21 +07:00
Vincent Petry ca37664887 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-19 14:51:39 +07:00