Commit Graph

4662 Commits

Author SHA1 Message Date
Joas Schilling
7f70f3e182
Fix support tests
2) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #0 (35, 15, 2, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

3) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #1 (35, 45, 15, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

4) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #2 (35, 45, 5, true)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

5) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #3 (35, 45, 55, false)
Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist

Had to use the Database user backend, as using multiple interfaces is deprecated:
https://github.com/sebastianbergmann/phpunit/issues/3955
> This functionality should be deprecated as "having to use it" is almost always a symptom of bad design.
> More importantly, though, the support for the creation of test doubles that implement multiple interfaces
> resulted in code that is hard to maintain.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 17:36:15 +02:00
blizzz
92ca49d21d
save a whitespace today
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-20 14:03:01 +02:00
Arthur Schiwon
f8d1ee5cfa
ignore mail shares of related remote share results
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-20 14:02:35 +02:00
Joas Schilling
751be29c73
Merge pull request #26555 from nextcloud/techdebt/noid/run-migrator-tests-on-OCI
Run migrator tests on OCI
2021-04-19 08:57:41 +02:00
Roeland Jago Douma
808e589035 Allow registering NotifierServices trough IBootstrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-16 13:56:28 +02:00
Joas Schilling
1670d00452 Integer 0 is not stored as Null and therefor works
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-16 09:57:27 +02:00
Joas Schilling
8b4ecdcc88 Test that oracle throws on EmptyValues in a NotNull columns
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-16 09:57:27 +02:00
Joas Schilling
e88bad4b0a Run migrator tests on OCI
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-16 09:57:27 +02:00
Roeland Jago Douma
b5ffca00f7 Fix unit test
* Fix namespace
* Fix test

Was broken after https://github.com/nextcloud/server/pull/26529

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-16 09:47:52 +02:00
Vincent Petry
af61486aea
Separate settings for remote share expiration
Added separate settings for default and enforced expiration date for
remote shares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-04-15 10:06:09 +02:00
Roeland Jago Douma
789bb0d0ac
Merge pull request #26266 from nextcloud/future-proof-networking
Improve networking checks
2021-04-12 12:42:33 +02:00
Lukas Reschke
e5a4236e68 Increase subnet matcher
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-04-07 12:28:59 +00:00
Lukas Reschke
4b4971ab52
Merge pull request #24966 from nextcloud/jknockaert-patch-1
avoid fread on directories and unencrypted files
2021-04-06 13:45:10 +02:00
Lukas Reschke
9dab851931 Adjust test
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-04-06 11:37:47 +00:00
Lukas Reschke
5f3abffe6f Improve networking checks
Whilst we currently state that SSRF is generally outside of our threat model, this is something where we should invest to improve this.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-04-06 11:37:47 +00:00
Morris Jobke
5fb909faa5
Merge pull request #24055 from nextcloud/bugfix/noid/enfore-no-notnull-for-boolean-to-store-false
Enforce no notnull for boolean to store false
2021-04-01 18:30:26 +02:00
Julius Härtl
37591f05dc
Get the parent directory before creating a file from a template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-01 13:48:21 +02:00
Joas Schilling
f9d4fa2d38
Rename the method to match what it does
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:18 +02:00
Joas Schilling
3696ef5b96
Don't allow Notnull for boolean columns
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:17 +02:00
kesselb
2212a67fbc
Merge pull request #25961 from nextcloud/enh/events/2fa_provider
Add real events for enabled 2fa providers for users
2021-03-30 23:13:36 +02:00
Roeland Jago Douma
f3738eeff7
Merge pull request #25280 from nextcloud/explicit-file-permissions
Set umask before operations that create local files
2021-03-30 21:55:50 +02:00
Arthur Schiwon
be3ae9a44b
gracefully handle deleteFromSelf when share is already gone
- handling race conditions

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-03-30 12:59:40 +02:00
Joas Schilling
8d3fdf24c8
Merge pull request #26353 from nextcloud/techdebt/noid/make-testcase-class-compatible-with-phpunit-9.5
Make Testcase class compatible with phpunit-9.5
2021-03-29 10:47:37 +02:00
Joas Schilling
cd35a5c71d
Make Testcase class compatible with phpunit-9.5
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-29 09:43:08 +02:00
Vincent Petry
cc54f718f5
Add known user check in avatar when v2-private scope
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:10 +01:00
Vincent Petry
bb008be28a
Added PlaceholderAvatar with own cached images
When avatar scope is private, the PlaceholderAvatar is used to deliver a
placeholder avatar based on the user's initials.

This was implemented as a separate class for now to avoid messing with
the existing UserAvatar implementation and its generated vs
non-generated logic.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:09 +01:00
Vincent Petry
b73df5846c
Add property scope tests for AccountManager
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:09 +01:00
Vincent Petry
278a73789e
Map old account scope properties to new names
Use new scope values in settings page.
Adjust all consumers to use the new constants.
Map old scope values to new ones in account property getter.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:08 +01:00
Vincent Petry
b81a1c1bdb
Add new v2-private account scope
Added new v2-private account manager scope that restricts the scope
further by excluding public link access.

Avatars with v2-private account scope are now showing the guest avatar
instead of the real avatar.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:05 +01:00
Morris Jobke
ab48d5e8cb
Cleanup unneeded code around database.xml
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-03-24 22:15:44 +01:00
Robin Appelman
e5dc1a8085
Set umask before operations that create local files
this solves issues where "other php stuff" is messing with the umask

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-23 14:52:31 +01:00
Morris Jobke
1c074e7602
Merge pull request #26198 from nextcloud/unified-search-node
Handle limit offset and sorting in files search
2021-03-22 21:48:51 +01:00
Roeland Jago Douma
3c5cf825b3 Add real events for enabled 2fa providers for users
* Shiny new events
* Listener to still emit the old event

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-22 20:57:10 +01:00
John Molakvoæ (skjnldsv)
15767643f2
Fix sharebymail tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-03-22 06:50:47 +01:00
Daniel Calviño Sánchez
f99876997a
Remove duplicated query for email shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
2021-03-22 06:50:47 +01:00
Robin Appelman
bfe3712372
handle ordering in folder search
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 16:07:54 +01:00
Julius Härtl
76170a58eb
Log and continue when failing to update encryption keys during for individual files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-03-19 14:12:07 +01:00
Robin Appelman
feed42dd6d
folder filtering in sql
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 13:41:00 +01:00
Roeland Jago Douma
1286848731
Merge pull request #23718 from nextcloud/already-shared-error-message
expand 'path is already shared' error message
2021-03-19 13:39:22 +01:00
Robin Appelman
de713967c0
cleanup fileinfo creation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 13:35:37 +01:00
Vincent Petry
7bf5adb1fa
Merge pull request #26200 from nextcloud/bugfix/26197/fix-expiration-validation-confusion
Update user share must use correct expiration validation
2021-03-19 10:51:21 +01:00
Robin Appelman
bd229e7548
handle limit and offset in folder file search
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-18 17:38:31 +01:00
Robin Appelman
50e374c12f
only require user to be set in a query that handles tags
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-18 17:16:28 +01:00
Vincent Petry
a9e3d2a10f
Update user share must use correct expiration validation
Updating a user or group share now uses the correct method for the
validation of the expiration date. Instead of using the one from links
it uses the one for internal shares.

To avoid future confusion, the method "validateExpirationDate" has been
renamed to "validateExpirationDateLink".

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-18 17:12:28 +01:00
Robin Appelman
9e3775618b
log full expection during repair step
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-18 08:45:17 +01:00
Julius Härtl
a2f3077ee8
Skip db migration simulation for core schema changes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-03-17 21:08:22 +01:00
Joas Schilling
0d46fafd41
Merge pull request #26161 from nextcloud/bugfix/noid/improve-matching-of-phonebook-searches
Improve search results when only phonebook-matches can we autocompleted
2021-03-17 15:22:03 +01:00
Joas Schilling
cf434d5107
Also limit to user group in case enumeration is enabled for groups and phonenumbers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-17 11:20:30 +01:00
Joas Schilling
9a189bc710
Improve search results when only phonebook-matches can we autocompleted
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-17 09:51:31 +01:00
Vincent Petry
e559afb8d4
Merge pull request #25136 from nextcloud/cachejail-search-filter
do cachejail search filtering in sql
2021-03-15 17:45:30 +01:00