Commit graph

19601 commits

Author SHA1 Message Date
Louis Chemineau
6a1a9485cf Fix backport
Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-12-13 15:35:05 +01:00
Joas Schilling
e552806d46 Make psalm more happy
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:23:05 +00:00
Joas Schilling
76f5436f9b Fix docs to make Psalm happier
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:23:04 +00:00
Joas Schilling
0b717bd056 Convert strict_search to wildcard property and add psalm docs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:23:04 +00:00
Joas Schilling
3879c2eb1e Limit more contact searches
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:23:04 +00:00
Joas Schilling
1d7971bf41 Only limit search in the system address book
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:23:04 +00:00
Joas Schilling
631b5fc64b Only wildcard search if enumeration is allowed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 14:23:04 +00:00
Côme Chilliet
df23d75930
Avoid assignment in if clause
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:35:00 +01:00
Côme Chilliet
4c3f9830a2
Fix typing problems in OC_Image
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:34:59 +01:00
Côme Chilliet
df7de41af2
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-13 09:34:35 +01:00
Nextcloud bot
f1c4795ea6
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-12 02:28:29 +00:00
Vincent Petry
b880b9507e
Merge pull request #30181 from nextcloud/backport/30160/stable22
[stable22] Check resource before closing in encryption wrapper
2021-12-10 08:56:12 +01:00
Nextcloud bot
86f2f81740
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-10 02:27:32 +00:00
Vincent Petry
76e5b1af7c 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:07:49 +00:00
Nextcloud bot
bda1956b2c
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-09 02:29:38 +00:00
Louis
010be3d775
Merge pull request #30057 from nextcloud/backport/29735/stable22
[stable22] find users for background scan one by one
2021-12-08 17:57:46 +01:00
Nextcloud bot
080a550621
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-08 02:28:53 +00:00
Nextcloud bot
9bb15a74b6
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-07 02:40:03 +00:00
Nextcloud bot
f661ea9d74
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-06 02:30:33 +00:00
Robin Appelman
904fce3c87 code checker fixes for instanceOfStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-06 01:11:44 +01:00
Robin Appelman
73a8ea2d4e 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-06 01:11:44 +01:00
Robin Appelman
7ac91d5632 teach psalm about Storage::instanceOfStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-06 01:11:43 +01:00
Nextcloud bot
7c64b0d8a7
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-05 02:30:29 +00:00
Joas Schilling
64834a0d45 Fix log_query config flag
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 09:38:29 +00:00
Christoph Wurst
322f3238d7 Include previous execption for repair steps that don't exist
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-30 11:59:28 +00:00
Christoph Wurst
1933b3d8cb 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 11:59:28 +00:00
Nextcloud bot
e583ef380b
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-30 02:26:35 +00:00
Nextcloud bot
de79073c98
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-29 02:25:21 +00:00
Christoph Wurst
b030114b39 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-28 04:27:08 +01:00
Louis Chemineau
71b823782b Use strict comparison to detect usage of redis cluster
Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-11-25 18:54:55 +00:00
szaimen
f64987b7f2
Merge pull request #29802 from nextcloud/backport/29632/stable22
[stable22] fix imagecreatetruecolor() error
2021-11-25 17:30:26 +01:00
Joas Schilling
696e4f16a5
Check for invalid characters before trimming
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-25 15:39:19 +01:00
Louis
62416a35ee
Merge pull request #29509 from nextcloud/backport/28385/stable22
[stable22] properly handle cases where cache wrappers block access
2021-11-25 14:36:39 +01:00
Nextcloud bot
24d284065b
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-25 02:25:15 +00:00
Robin Appelman
c4fa59c540 properly handle cases where cache wrappers block access
`CacheWrapper::formatCacheEntry` can return false for files that should be filtered out

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-11-24 20:17:55 +01:00
Nextcloud bot
6759ee5caf
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-24 02:26:06 +00:00
Vincent Petry
74eeca32ee 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:25:54 +00:00
Vincent Petry
cc0d10435b 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:25:54 +00:00
Vincent Petry
c247e237d7 Fix getting subnet of ipv4 mapped ipv6 addresses
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-23 10:25:54 +00:00
Nextcloud bot
fc785c940d
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-23 02:26:14 +00:00
Vincent Petry
3b66b4f0ea
Merge pull request #29795 from nextcloud/backport/29605/stable22
[stable22] Normalize file name before existence check in scanner
2021-11-22 09:39:19 +01:00
Nextcloud bot
24993be5da
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-22 02:45:46 +00:00
Nextcloud bot
6f97e1f8f5
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-20 02:42:21 +00:00
szaimen
3da3e0f10b fix imagecreatetruecolor() error
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-11-19 19:51:38 +00:00
Vincent Petry
a721d346b9 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:40 +00:00
Vincent Petry
2b4badf768 Move storage encoding compatibility warning logic
The encoding check for file names is now happening the Scanner, and an
event will be emitted only if the storage doesn't contain the encoding
compatibility wrapper.

The event is listened to by the occ scan command to be able to display a
warning in case of file name mismatches when they have NFD encoding.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-19 14:51:40 +00:00
Vincent Petry
787d7956cb Normalize file name before existence check in scanner
The scanner would not find a NFD-encoded file name in an
existing file list that is normalized.

This normalizes the file name before scanning.

Fixes issues where scanning repeatedly would make NFD files flicker in
and out of existence in the file cache.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-19 14:51:39 +00:00
Nextcloud bot
ab83f3ab0f
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-19 02:38:28 +00:00
Naoto Kobayashi
4d1daa5549 OC_Util::isNonUTF8Locale: fix lint error
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-17 09:01:46 +00:00
Naoto Kobayashi
a0cd7fc176 OC_Util::isSetLocaleWorking: fix typo
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-17 09:01:45 +00:00