Commit graph

6160 commits

Author SHA1 Message Date
Vincent Petry
64f376e4b9
Merge pull request #31098 from nextcloud/backport/30942/stable23
[stable23] only setup part of the filesystem for appdata requests
2022-03-01 16:00:45 +01:00
Joas Schilling
c8db7d35bf Allow apps to specify if their background job can be delayed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-22 10:59:19 +00:00
Robin Appelman
417ead0a6b fix fs cache test user setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-16 10:46:48 +00:00
Vincent Petry
287d058a57
Merge pull request #30949 from nextcloud/bugfix/noid/allow-to-disable-v1-authtokens
[stable23] Allow to disable AuthToken v1
2022-02-16 11:24:33 +01:00
Joas Schilling
a429f02a62
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-31 20:36:06 +01:00
John Molakvoæ
3ee9bcc4f7
Merge pull request #30814 from nextcloud/backport/30508/stable23 2022-01-27 20:06:29 +01:00
Carl Schwan
d69531ac8e
Fix psalm not running
The issue was that we were using psalm/phar instead of vimeo/psalm. This
caused issue with the custom psalm plugin in buildd/psalm.

This is using the opportunity to also update the psalm version from 3.8
to 3.17 and the php-cs-fixer too.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-27 17:20:00 +01:00
Carl Schwan
fab0e6dbe7
Fix tests with email templates
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-20 10:37:59 +01:00
Julius Härtl
1938c41ace
Merge pull request #30659 from nextcloud/backport/29622/stable23 2022-01-14 10:41:46 +01:00
John Molakvoæ
05a13d3dc6
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-01-14 08:31:38 +01:00
Carl Schwan
2b2d23ce21
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:10:43 +01:00
Joas Schilling
b89e743976
Merge pull request #30611 from nextcloud/backport/30588/stable23
[stable23] Fix undefined/unset scope in account properties
2022-01-12 13:51:07 +01:00
Joas Schilling
08037eac25 Fix test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-11 18:44:56 +00:00
Joachim Bauch
cebac86ecd 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:49:08 +00:00
Christopher Ng
c699f1bec2 Fix email verification
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-01-07 10:52:36 +00:00
Robin Appelman
cc57b2b68e fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-02 17:47:06 +00:00
Arthur Schiwon
c853206e8a add method to shorten a string to given byte size to Utils
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-11-26 17:27:16 +00:00
Vincent Petry
e7890cc401 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:23:02 +00:00
Vincent Petry
e98ee218be Fix getting subnet of ipv4 mapped ipv6 addresses
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-23 10:23:00 +00:00
Vincent Petry
f0661de4e5 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:38 +00:00
Naoto Kobayashi
d27be604d4 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-16 17:52:18 +00:00
Naoto Kobayashi
df52393d31 Add check whether escapeshellcmd behaves the same as basename
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-16 17:52:18 +00:00
Naoto Kobayashi
7e80182e75 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-16 17:52:17 +00:00
Joas Schilling
49486de8cd Fix branch selection in stable23
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-15 06:58:05 +01:00
Joas Schilling
f0045bf139 Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-12 14:49:38 +00:00
Joas Schilling
3b91e4cc48
Add unit test for share enumeration method
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-09 14:42:57 +01:00
Joas Schilling
fa036b2001
Move common logic to share manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-09 10:10:53 +01:00
Christoph Wurst
95480f5a91
Merge pull request #29524 from nextcloud/bugfix/noid/fix-phpunit-warnings
Fix missing import of ILogger
2021-11-02 19:23:23 +01:00
Joas Schilling
f8463e1fc6
Fix missing import of ILogger
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-02 16:47:16 +01:00
Côme Chilliet
58b6f35522
Enable Avatar tests as well for PHP>=8
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-28 17:49:32 +02:00
Côme Chilliet
23a4e17bd1
Revert "Do not run image tests on php8"
This reverts commit d690f90928.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-28 17:49:21 +02:00
Joas Schilling
c42f5bc5f6
Add an OCP for trusted domain helper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-28 10:24:16 +02:00
John Molakvoæ
f4e4a85fcf
Merge pull request #27440 from nextcloud/is-file-handle 2021-10-23 11:18:52 +02:00
John Molakvoæ
a06001e085
Merge pull request #29363 from nextcloud/fair-use-push 2021-10-23 10:53:22 +02:00
Vitor Mattos
d613b32045
add check isFairUseOfFreePushService on login
Signed-off-by: Vitor Mattos <vitor@php.rio>
2021-10-23 00:54:50 +02:00
Joas Schilling
b578a1e8b5
Fair use of push notifications
We want to keep offering our push notification service for free, but large
users overload our infrastructure. For this reason we have to rate-limit the
use of push notifications. If you need this feature, consider setting up your
own push server or using Nextcloud Enterprise.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-23 00:54:50 +02:00
Arthur Schiwon
e26d6f080b
fix populating account array with missing default values
- both $userData and $defaultUserData have numeric indices
- each element contains at least the name and other fields
- appending the missing data array is sufficient

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-10-22 23:05:43 +02:00
acsfer
dae769d082
Update Tests 2021-10-22 12:16:11 +02:00
John Molakvoæ
2be0eda47c
Merge pull request #29220 from nextcloud/s3-external-list 2021-10-22 12:06:05 +02:00
John Molakvoæ
c98039c1df
Merge pull request #26725 from nextcloud/fix-federated-scope-not-shown-when-public-addressbook-upload-is-disabled 2021-10-22 11:52:56 +02:00
John Molakvoæ
0a35937662
Merge pull request #26347 from J0WI/clean-path-regex 2021-10-22 11:42:30 +02:00
John Molakvoæ
7e3b6e7088
Merge pull request #29344 from nextcloud/dependabot/composer/doctrine/dbal-3.1.3 2021-10-22 11:35:02 +02:00
Christoph Wurst
7dd7256cfe
Prevent duplicate auth token activity updates
The auth token activity logic works as follows
* Read auth token
* Compare last activity time stamp to current time
* Update auth token activity if it's older than x seconds

This works fine in isolation but with concurrency that means that
occasionally the same token is read simultaneously by two processes and
both of these processes will trigger an update of the same row.
Affectively the second update doesn't add much value. It might set the
time stamp to the exact same time stamp or one a few seconds later. But
the last activity is no precise science, we don't need this accuracy.

This patch changes the UPDATE query to include the expected value in a
comparison with the current data. This results in an affected row when
the data in the DB still has an old time stamp, but won't affect a row
if the time stamp is (nearly) up to date.

This is a micro optimization and will possibly not show any significant
performance improvement. Yet in setups with a DB cluster it means that
the write node has to send fewer changes to the read nodes due to the
lower number of actual changes.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-22 09:32:22 +02:00
Christoph Wurst
130ab63ca1
Bump doctrine/dbal from 3.0.0 to 3.1.3
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-22 09:03:45 +02:00
Julien Veyssier
0bef570fe9
Merge pull request #29256 from nextcloud/fix/noid/harmonize-appstoreenabled-check
Fix appstoreenabled check
2021-10-21 12:42:14 +02:00
Joas Schilling
f24e8212c3
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-21 09:27:12 +02:00
Joas Schilling
7f1dc52a66
Change origin field to appId
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-20 14:47:28 +02:00
John Molakvoæ
5e23800a95
Do not remove current user on findOne
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-10-20 11:53:45 +02:00
John Molakvoæ
873e8e219c
Add appName to contactsmenu action API
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-10-20 11:53:45 +02:00
Christopher Ng
309354852f Profile backend
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-10-19 04:59:35 +00:00