Commit Graph

6007 Commits

Author SHA1 Message Date
Lukas Reschke 377514aad1 Escape filename in Content-Disposition
We should escape all occurences of ' and \ in here.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 19:22:17 +02:00
John Molakvoæ d0cf20cc51
Merge pull request #26792 from nextcloud/user-delete-cleanup-files
better cleanup of user files on user deletion
2021-06-02 17:02:00 +02:00
Christoph Wurst b29c3aa03f
Merge pull request #25658 from nextcloud/dav-respect-disallow-sharing-with-groups
Dav respect disallow sharing with groups
2021-06-01 12:07:29 +02:00
François Freitag b0847abcc2 Rewrite requesttoken.spec.js with Jest
[Jest](https://jestjs.io/) is a test runner that focuses on simplicity.
It instruments babel to transform modules and test them.

Using Jest simplifies the existing configuration and allows dropping a
bunch of workarounds, as well as following the shared Babel
configuration for new code.

Signed-off-by: François Freitag <mail@franek.fr>
2021-05-30 10:44:34 +02:00
Thomas Citharel 1c0d975654
Make dav respect disallowing sharing with groups
Closes #25390

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-05-26 11:19:59 +02:00
blizzz 1b47886abb
Merge pull request #27035 from nextcloud/techdebt/26866/userscontroller-accountmanager-api
do not use private AccountManager in UsersController
2021-05-25 21:22:37 +02:00
Morris Jobke 726d01843e
Merge pull request #26600 from hosting-de/feature/occ-tags
Add commands to manage tags via OCC
2021-05-25 16:54:06 +02:00
Arthur Schiwon 847ed37afc
do not use private AccountManager in UsersController
- extends IAccountProperty for verificationData getters and setters
- implementation thereof ^
- and of course adaption of UsersController

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-05-25 14:35:38 +02:00
Johannes Leuker d606799ee2 Add commands to manage tags via OCC
list, add, delete, edit

Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
2021-05-25 11:29:32 +02:00
Morris Jobke f1dbabd910
Merge pull request #26727 from nextcloud/group-exclude-link-share
Add option to exclude groups from creating link shares
2021-05-21 15:35:39 +02:00
Valdnet 1627eb45bb
l10n: Fix test 2021-05-20 09:26:38 +02:00
Julius Härtl 35b910cf8e
Merge pull request #26322 from nextcloud/recent-search
Use file search for recent files and optimize getting share types
2021-05-18 09:44:08 +02:00
Roeland Jago Douma ee3dc57cbd
Merge pull request #26626 from J0WI/strict-security
Make Security module strict
2021-05-18 08:43:13 +02:00
blizzz 0ab5b3e265
Merge pull request #26679 from nextcloud/bugfix/noid/fix-unauthorized-ocs-status-in-provisioning
Fix unauthorized OCS status in provisioning
2021-05-13 23:39:20 +02:00
Robin Appelman b1dca57a1c
load share settings from the share manager in more places
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-05-12 16:11:28 +02:00
Joas Schilling b6c6527705
Fix unauthorized OCS status in provisioning
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-12 08:16:07 +02:00
Arthur Schiwon 8413ed9475
allow to set valid scopes only in AccountProperty
the auto-fallback to v2-local is removed as well to react on wrong input

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-05-12 01:31:15 +02:00
Christoph Wurst 6a5d89c1ac
Merge pull request #26758 from J0WI/more-strict
Some more strict_types
2021-04-28 09:28:19 +02:00
Robin Appelman ed2d02d5f1
better cleanup of user files on user deletion
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-27 20:29:51 +02:00
Christoph Wurst 99f0b10421
Merge pull request #26591 from nextcloud/techdebt/noid/less-ilogger
Less ILogger
2021-04-27 15:38:12 +02:00
Joas Schilling 48c50277a9
Merge pull request #26718 from nextcloud/bugfix/noid/fix-ratelimit-template
Fix ratelimit template
2021-04-27 15:18:02 +02:00
Joas Schilling c52a026f55
Merge pull request #26572 from nextcloud/bugfix/noid/throw-401-when-authentication-is-provided-and-invalid
Throw "401 Unauthenticated" when authentication is provided but invalid
2021-04-27 14:37:28 +02:00
Joas Schilling df47445c01
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 14:34:32 +02:00
Joas Schilling 174f4dd043
Fix ratelimit template
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 13:55:34 +02:00
Joas Schilling aa651fd629
Merge pull request #26259 from nextcloud/feature/noid/validate-website-to-be-valid
Validate the website field input to be a valid URL
2021-04-26 13:56:01 +02:00
J0WI 8323cbb9e5 Use strict
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-04-26 12:45:12 +02:00
Morris Jobke 012f791c8f
Merge pull request #26375 from nextcloud/techdebt/noid/symfony-component-translation-pluralization-rules-is-deprecated
"Symfony\Component\Translation\PluralizationRules" is deprecated
2021-04-22 21:20:16 +02:00
Joas Schilling d80cc76ee7
Validate the website field input to be a valid URL
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-22 16:34:13 +02:00
Joas Schilling 4ed296db9f
Fix Authentication test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-22 15:36:34 +02:00
John Molakvoæ 3da956bcdc
Merge pull request #23529 from Simounet/feat/23397-settings-new-user-modal
Settings: new user row replaced by a modal
2021-04-21 16:38:46 +02:00
Robin Appelman effb7dc8ba
set mimetype for objects uploaded to object storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-21 15:25:58 +02:00
Simounet 45c3b2a478
Settings: new user row replaced by a modal
Signed-off-by: Simounet <contact@simounet.net>
2021-04-21 14:42:46 +02:00
Robin Appelman 0d5f4edc22
adjust tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-21 14:09:07 +02:00
Morris Jobke d2ea068552
Merge pull request #26669 from nextcloud/nickvergessen-patch-1
Fix PHP CS
2021-04-21 14:07:17 +02:00
John Molakvoæ 31d88209f7
Merge pull request #25991 from nextcloud/update-acceptance-tests-to-selenium3 2021-04-21 09:31:29 +02:00
Joas Schilling 2a11713337 Update CredentialsManagerTest.php
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-21 08:33:10 +02:00
Morris Jobke 9e8690d912
Merge pull request #26654 from nextcloud/bugfix/noid/fix-security-credentials-manager-test
Fix security credentials manager test
2021-04-20 22:03:52 +02:00
Roeland Jago Douma 5ee9e1f784 Move 2FA registration to IBootstrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-20 21:01:16 +02:00
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
Joas Schilling c6978bac80
Fix security credentials manager test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 17:04:24 +02:00
Joas Schilling 79ebc7f24c
Fix test by defining plurals
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 16:43:43 +02:00
Joas Schilling 5a514a9a41
Correctly replace all PHP placeholders with the parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-20 16:42:05 +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
J0WI ca7b37ce5a Make Security module strict
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-04-19 17:31:12 +02:00
Daniel Calviño Sánchez 4b376a107b Add automatic handling of "ElementNotInteractable" exceptions
In the WebDriver protocol, when a command fails because it can not
interact with the target element, an "element not interactable" error is
generated. It can be a transitive issue (for example, due to an
animation), so when the error is received the command should be tried
again, just like done, for example, with "ElementNotVisible" exceptions.

However, the last version of the "instaclick/php-webdriver" library
compatible with the Selenium Driver of Mink did not support yet that
WebDriver error. And even if Chrome is run using the old protocol an
unknown "element not interactable" error can be received anyway in some
cases. When an unknown error is received by the
"instaclick/php-webdriver" library it is thrown as a generic Exception
so, until the library can be updated, the message of generic exceptions
is checked and the command is retried if it matched.

For the time being "element not interactable" errors are handled like
"ElementNotVisible" exceptions; this may need to change once the error
is better understood.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-19 16:35:11 +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
Daniel Calviño Sánchez 9e1246eba5 Update acceptance tests to Selenium 3
The acceptance tests used the last Selenium 2 Docker container
available, which provides a rather old Firefox version (Firefox 47).
Nevertheless, despite some rendering issues, most things still worked as
expected due to the JavaScript files being built with support for older
browsers. However, now that support for Internet Explorer 11 and older
browsers will be dropped things could start to fail, so a newer browser
(and thus a newer Selenium version) should be used in the acceptance
tests.

Selenium has been standardized by the W3C, and the protocol to
communicate between the Selenium server and the browser has changed due
to that. Firefox >= 48 only supports the new W3C protocol, but the
Selenium driver for Mink does not support it yet.

The old protocol can still be used in recent Chromium/Chrome versions by
explicitly forcing it, so for the time being the acceptance tests will
need to be run on Chrome instead (although Firefox provides some
interesting features like the fake streams that would be needed to test
calls in Talk, so they should be moved again to Firefox once possible).

Finally, the default shm size of Docker is 64 MiB. This does not seem
enough to run newer Chrome releases and causes the browser to randomly
crash during the tests ("unknown error: session deleted because of page
crash" is shown in the logs). Due to this "disable-dev-shm-usage" needs
to be used so Chrome writes shared memory files into "/tmp" instead of
"/dev/shm" (the default shm size of Docker could have been increased
instead using "docker run --shm-size...", but that seems to be
problematic when the container is run in current Drone releases).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-16 20:00:15 +02:00
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