Commit Graph

6165 Commits (2fe8042fff7853b57c9943748bc7dc8b820bd030)

Author SHA1 Message Date
Julius Härtl 2fe8042fff
Add integration tests for email completion
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-08 09:08:54 +07:00
John Molakvoæ (skjnldsv) 791d57051a
Adapt tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-12-02 21:13:07 +07:00
Robin Appelman 6b3c703794
Merge pull request #29735 from nextcloud/background-scan-one-by-one
find users for background scan one by one
2021-12-02 17:09:43 +07:00
Robin Appelman e95745c074
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-02 17:43:16 +07:00
Joas Schilling 6d33d75be1
Remove unused imports
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 14:51:44 +07:00
Joas Schilling 617528312a
Fix last tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 10:39:49 +07:00
Joas Schilling 3e20cffc86
More test fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 22:38:57 +07:00
Joas Schilling c6ae53096c
More test fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 22:17:19 +07:00
Joas Schilling 9f00179037
More unit test adjustments
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 21:40:14 +07:00
Carl Schwan a8866b0253
Fix tests
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-01 19:53:24 +07:00
Arthur Schiwon d384edc9c6
add method to shorten a string to given byte size to Utils
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-11-26 16:21:40 +07:00
Vincent Petry fd487c1a43
Merge pull request #29432 from nextcloud/fix/support-php-8.1
Support PHP 8.1 - First batch
2021-11-23 15:41:20 +07:00
Côme Chilliet 8b271b8a12
Fix tests and avoid PHP errors in them
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:29:01 +07:00
Côme Chilliet cd72045433
Make mock config return default value to fix warnings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:29:00 +07:00
Côme Chilliet 25fa0b8acd
Fix TempManager test errors about passing null to is_dir
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:29:00 +07:00
Côme Chilliet 065531570d
Fix Encryption tests on PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:59 +07:00
Côme Chilliet bb9c099e42
Fix FolderTest calls to Mountpoint constructor with wrong type
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:59 +07:00
Côme Chilliet 3a1b3745eb
Fix DateTime constructor calls with null
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:58 +07:00
Côme Chilliet bc3acfc957
Fix test class names
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:57 +07:00
Côme Chilliet 66bdda568a
Fix Guzzle function calls
Since 1.7.0 and 2.0 these functions are turned into static methods.
See https://github.com/guzzle/psr7#upgrading-from-function-api

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:57 +07:00
Côme Chilliet 113756db30
Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +07:00
Vincent Petry f01ad7b8d8
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-22 16:46:25 +07:00
Vincent Petry 7e08a4ab15
Fix getting subnet of ipv4 mapped ipv6 addresses
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-22 14:10:11 +07:00
Vincent Petry c42a890126
Merge pull request #29622 from nextcloud/feat/objectstore_multibucket-shift
Implement multibucket shift for ObjectStore
2021-11-19 17:26:44 +07:00
Vincent Petry c92a0e4152
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-17 09:43:25 +07:00
Naoto Kobayashi e9b414fbe3 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 00:40:52 +07:00
Naoto Kobayashi 25f15f86a9 Add check whether escapeshellcmd behaves the same as basename
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-15 18:33:50 +07:00
Naoto Kobayashi 455bff5c17 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-14 09:18:59 +07:00
Joas Schilling 265c2c125c
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-12 15:01:56 +07:00
John Molakvoæ 6ab2feaa54
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-11-11 15:09:28 +07: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 +07:00
Joas Schilling fa036b2001
Move common logic to share manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-09 10:10:53 +07: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 +07:00
Joas Schilling f8463e1fc6
Fix missing import of ILogger
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-02 16:47:16 +07: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 +07: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 +07: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 +07:00
John Molakvoæ f4e4a85fcf
Merge pull request #27440 from nextcloud/is-file-handle 2021-10-23 11:18:52 +07:00
John Molakvoæ a06001e085
Merge pull request #29363 from nextcloud/fair-use-push 2021-10-23 10:53:22 +07:00
Vitor Mattos d613b32045
add check isFairUseOfFreePushService on login
Signed-off-by: Vitor Mattos <vitor@php.rio>
2021-10-23 00:54:50 +07: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 +07: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 +07:00
acsfer dae769d082
Update Tests 2021-10-22 12:16:11 +07:00
John Molakvoæ 2be0eda47c
Merge pull request #29220 from nextcloud/s3-external-list 2021-10-22 12:06:05 +07: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 +07:00
John Molakvoæ 0a35937662
Merge pull request #26347 from J0WI/clean-path-regex 2021-10-22 11:42:30 +07:00
John Molakvoæ 7e3b6e7088
Merge pull request #29344 from nextcloud/dependabot/composer/doctrine/dbal-3.1.3 2021-10-22 11:35:02 +07: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 +07: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 +07:00
Julien Veyssier 0bef570fe9
Merge pull request #29256 from nextcloud/fix/noid/harmonize-appstoreenabled-check
Fix appstoreenabled check
2021-10-21 12:42:14 +07:00