Commit Graph

5956 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez 14b85f4eec Replace carriage return with WebDriver "ENTER" constant
When the value is set in some input fields a carriage return was sent to
simulate pressing the enter key and thus confirming the input. However,
different browsers use different keys (Firefox uses "\r", but Chrome
uses "\n"), so the carriage return was replaced with the WebDriver
"ENTER" constant which is common to both browsers.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-16 20:00:15 +02:00
Daniel Calviño Sánchez 38b88422a8 Do not send "enter" key when not needed
Sending the "enter" key is not needed in those input fields that auto
save while the user is typing or when the focus is lost (which since
version 1.4.0 the Selenium driver for Mink is automatically done after
setting the value).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-16 20:00:15 +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
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
Daniel Calviño Sánchez f216b9307a
Update Mink from 1.7.1 to 1.8.1 in acceptance tests
Since version 1.8.0 of Mink "Mink::getSession()" no longer starts the
session automatically (see https://github.com/minkphp/Mink/pull/705), so
it now needs to be explicitly started.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-30 08:35:16 +02:00
Daniel Calviño Sánchez 7625a87412
Update Selenium driver for Mink from 1.3.1 to 1.4.0 in acceptance tests
Since version 1.4.0 the Selenium driver for Mink uses again the element
on which the value was set (see
https://github.com/minkphp/MinkSelenium2Driver/pull/286). When creating
a new folder or renaming one sending a new line ("\r") caused the
element on which the value was set to be removed, so the element was no
longer attached to the DOM when the driver tried to use it again, and
thus a "StaleElementReference" exception was thrown.

Due to this now it is needed to explicitly click the confirm button when
creating a new folder. In the case of the renaming, on the other hand,
nothing else besides not sending the new line is needed, as the Selenium
driver now unfocuses the element (that is why it uses again the element
after setting the value) which triggers the renaming.

Besides that, the Selenium driver for Mink uses a library to simulate
certain events, bitovi/syn. In version 1.4.0 that library was updated to
version 0.0.3, which seems to somehow break pressing the "escape" key.
Due to this now the sharing menu has to be closed by pressing "enter" on
the share menu button instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-30 08:35:16 +02:00
Daniel Calviño Sánchez 223b36e851
Update Behat from 3.7.0 to 3.8.1 in acceptance tests
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-30 08:35:16 +02:00
Daniel Calviño Sánchez b53f49b940
Update PHPUnit from 4.X to 6.X in acceptance tests
The PHPUnit update also required an update of "symfony/yaml", so besides
the changes needed for PHPUnit the "behat.yml" file also had to be
adjusted.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-30 08:35:15 +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
Roeland Jago Douma 9fd29173cf
Merge pull request #26281 from hosting-de/fix/email
Change my email address
2021-03-26 09:59:35 +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
Johannes Leuker e9ca59ef0a Change my email address
Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
2021-03-24 15:13:56 +01:00
Vincent Petry 39a6d99526
Fix language codes test result order
Fixes issue with Oracle by enforcing the order of the results to check.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-24 10:26:06 +01:00
Vincent Petry 8b92776be4
Bring back forgotten tests
Remove "ocs-provider" test folder reference as it doesn't exist any
more.
Added back "Test" test subdir and fixed the tests inside.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-24 09:07:54 +01:00
Vincent Petry 95e03fba2d
Fix more controller tests in Core subdir
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-24 09:02:19 +01:00
Vincent Petry 9b8ca1697a
Fix more tests in the Core subdir
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-24 08:48:28 +01:00
Vincent Petry c467f64848
Fix core tests command for app enabling/disabling
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-23 20:40:28 +01:00
Vincent Petry e210e8e35a
Fix casing of core test folder
It seems Phpunit < 9 was case insensitive.
Fixed the phpunit config to target the correct name for the "Core" test
directory.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-23 18:12:46 +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
Morris Jobke 268acd301d
Merge pull request #25529 from nextcloud/fix-non-lgc-glyphs-in-avatars-and-txt-file-previews
Fix non LGC glyphs in avatars and txt file previews
2021-03-22 21:06:22 +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