Commit graph

19571 commits

Author SHA1 Message Date
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
Naoto Kobayashi
0bb3232a33 OC_Util: Add fallbacks to check if current locale is UTF8
Using escapeshellcmd to get current locale causes error
if the function is disabled.

Add fallbacks to prevent the error.

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-17 09:01:45 +00:00
Naoto Kobayashi
87a5620032 Check whether setlocale works only after setlocale
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-17 09:01:45 +00:00
Naoto Kobayashi
d5cff00d10 Fix missing setlocale with php 8
When php version = 8, basename('§') does not bug even if LC_ALL is non-UTF-8 locale.
This cause OC_Util::isSetLocaleWorking() to skip setlocale("C.UTF-8").

Fix it by using escapeshellcmd instead of basename.

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-17 09:01:45 +00:00
Nextcloud bot
692d26edd7
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-17 02:45:47 +00:00
Joas Schilling
3709a8182a
Apply changes from master's update to 3.1.3
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-15 19:06:36 +01:00
Joas Schilling
5300bade47
Allow NULL as well for limit, not integer only
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-15 18:59:14 +01:00
Nextcloud bot
89db6c0f17
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-15 02:24:42 +00:00
Nextcloud bot
3e4f4f7c7e
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-14 02:25:50 +00:00
Nextcloud bot
e127e27f21
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-13 02:25:56 +00:00
Joas Schilling
1aaf9f02a8 Fix missing token update
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-12 14:52:37 +00:00
Joas Schilling
ef48e7045e Fix updating with apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-11 13:42:56 +00:00
Nextcloud bot
c43c2409a6
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-10 02:24:39 +00:00
Nextcloud bot
43652ca542
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-08 02:33:18 +00:00
Nextcloud bot
580759a37a
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-07 02:22:43 +00:00
Nextcloud bot
40d5086dcf
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-06 02:22:52 +00:00
Nextcloud bot
97085c9a3a
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-05 02:23:07 +00:00
John Molakvoæ
fd35e9c13b
Merge pull request #29383 from nextcloud/backport/29304/stable22 2021-11-04 08:45:57 +01:00
John Molakvoæ
244b7ca415
Merge pull request #29506 from nextcloud/backport/29281/stable22 2021-11-04 08:37:55 +01:00
Nextcloud bot
7d3a01e675
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-03 02:23:47 +00:00
Joas Schilling
986ed756a4
Merge pull request #29341 from nextcloud/backport/29320/stable22
[stable22] Fix basic auth for OAuth token endpoint
2021-11-02 15:19:48 +01:00
Côme Chilliet
90203c6ca7 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 09:59:35 +00:00
Nextcloud bot
db1d5b82ab
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-02 02:22:28 +00:00
Sijmen Schoon
071eda7baa 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:08:32 +00:00
Sijmen Schoon
ec3b1ccd91 Limit parameter count per query in Cache.removeChildren
Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
2021-11-01 11:08:31 +00:00
Carl Schwan
8993cf86f1
Merge pull request #29475 from nextcloud/backport/29115/stable22
[stable22] Fix permissions when copying from ObjectStorage
2021-10-30 11:20:07 +02:00
Joas Schilling
b392321e73 Fix basic auth for OAuth token endpoint
Don't try to login when a client is trying to get a OAuth token.
OAuth needs to support basic auth too, so the login is not valid
inside Nextcloud and the Login exception would ruin it.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-30 02:25:06 +02:00
MichaIng
5bd6a4fd29
Merge pull request #29415 from nextcloud/backport/27440/stable22
[stable22] Handle files with `is_file` instead of `file_exists`
2021-10-30 00:19:28 +02:00
Carl Schwan
7bf4a45f49 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-30 00:18:26 +02:00
Nextcloud bot
8901b34530
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-10-26 02:23:06 +00:00
Nextcloud bot
c799b48563
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-10-25 02:22:35 +00:00