Commit Graph

5683 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez 9303390b66
Hide share link menu before copying the share link in acceptance tests
The (old) Firefox version used in the acceptance tests does not properly
render the share link menu. As the menu is taller than it should
sometimes it covers the copy link button, so it is not possible to click
it without hiding the share link menu. Moreover, in those cases the
share menu button is also covered by the share menu, so the menu needs
to be closed by pressing the "Esc" key.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-07-22 15:59:35 +02:00
Georg Ehrke f217b11443
Fix breaking changes of nc/vue update
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-22 15:55:59 +02:00
Christoph Wurst 91e7f12088
Adjust apps' code to use the ContainerInterface
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-21 20:43:18 +02:00
Morris Jobke 5cd5d3c55b
Revert "Disable fragile tests for now"
This reverts commit 40e04c8391.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-21 15:58:55 +02:00
Julius Härtl 6f32b59b23
Remove outdated ui-regression tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-20 09:27:46 +02:00
Roeland Jago Douma 7d7ba61625
Add real events to load additionalscripts
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-15 14:07:18 +02:00
Julius Härtl 81e5593133
Move to lazy panel registration during registration context
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:27:57 +02:00
Christoph Wurst f03f88b437
Delegate bootstrap registration lazily
* Keep the registration context
* Expose the context object for other components
* Ensure registration is only run once

Search providers are migrated for demonstration.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-14 15:33:32 +02:00
Roeland Jago Douma 10d862e243
Merge pull request #21759 from nextcloud/enh/lazy_subscription
Make the subscription registry lazy
2020-07-09 15:43:48 +02:00
Daniel Kesselberg d9f5fdb67a
Add DummySubscription for tests
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-07-09 14:24:00 +02:00
Roeland Jago Douma 725872c23a
Make the subscription registry lazy
This will allow to do lazy registration here which should allow for
loading less (or at least only when needed!).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 12:21:06 +02:00
Robin Appelman 37c334a2a6
ensure mounts are scanned during tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-09 11:14:44 +02:00
Roeland Jago Douma 43efac345e
Use the correct mountpoint to calculate
If we use the owners mount point this results in null. And then the rest
of the checks get called with null. Which doesn't work.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 11:14:44 +02:00
Roeland Jago Douma 3f447b9c8c
Fix supporting defaults for routes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-08 19:52:45 +02:00
Roeland Jago Douma edc1c77dd9
Do not create a RouteActionHandler object for each route
This is not required and doesn't allow us to be properly lazy. On top of
it this doesnt allow us to cache the routes (since closures/objects
can't be cached).

This is the first small step into cleaning up the routing we have

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-07 12:33:22 +02:00
Holger Hees e70249e089
Update SecurityMiddleware.php
OC::$WEBROOT can be empty in case if your nextcloud installation has no url prefix. This will result in an empty Location Header.

in other areas OC::$WEBROOT is always used together with an /
2020-07-06 21:34:46 +02:00
Morris Jobke e20db42a0c
Tags.php and the old sharing mechanism
The old sharing mechanism isn't working anymore, because it was replaced by Share 2.0. Also it was nowhere used so this removes the code paths and reduces complexity.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 14:12:12 +02:00
Morris Jobke d3d11cb826
Merge pull request #21626 from nextcloud/enhancement/injectible-callables
Callable parameter injection
2020-07-05 22:03:12 +02:00
Christoph Wurst 4a3ea04baa
Callable parameter injection
This is like what we have to DI and classes, but for callables.

The motivating factor is to get rid of *service locators* in the `boot`
method of apps as a new pattern is about to emerge where we have lots of
`query` calls on the app or server container in order to fetch some
services.

With this little helper it's possible to call another (public) method
and magically have everything injected.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-03 14:37:46 +02:00
Joas Schilling 19e1efd1dd
Merge pull request #21439 from nextcloud/feature/noid/move-autocomplete-filter-event-to-new-dispatcher-and-class
Move AutoComplete::filterResults to new event dispatcher and GenericE…
2020-07-03 10:03:34 +02:00
Roeland Jago Douma d53e005458
Merge pull request #21360 from nextcloud/root-storage-prevent-scanning
prevent the root storage from accidentally scanning user folders
2020-07-02 21:07:16 +02:00
Roeland Jago Douma 0157e30ad4
Merge pull request #21599 from nextcloud/debt/noid/type-to-types
Replace TYPE with TYPES
2020-07-02 12:21:01 +02:00
Roeland Jago Douma 0ac3a65f62
Merge pull request #21653 from nextcloud/bugfix/noid/fix-ipv6-remote-addresses-from-x-forwarded-for-header
Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validating
2020-07-02 12:01:24 +02:00
Joas Schilling 74a9cadc50
Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validating
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-02 11:13:13 +02:00
Joas Schilling 35c6b1236f
Move AutoComplete::filterResults to new event dispatcher and GenericEvent
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-01 09:57:33 +02:00
Daniel Kesselberg 87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-30 23:46:22 +02:00
Joas Schilling 1336f44a68
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 16:13:09 +02:00
Joas Schilling b7060be18d
Fix robots "noindex, nofollow" signals
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-25 08:29:43 +02:00
Roeland Jago Douma 7d4682da40
Merge pull request #21379 from nextcloud/fix-share-permission-checkboxes-enabled-when-permissions-can-not-be-set
Fix share permission checkboxes enabled when permissions can not be set
2020-06-24 21:20:17 +02:00
Joas Schilling a2f34f46b2
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 18:13:37 +02:00
Joas Schilling 89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +02:00
Christoph Wurst 4488e846a5
Add unified search API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-24 14:20:25 +02:00
Joas Schilling 95652d4469
Fix language in share notes email for users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-23 22:01:40 +02:00
Joas Schilling 8ec1b8132e
Merge pull request #21452 from nextcloud/bugfix/21451/allow-autocomplete-by-displayname-again
Fix autocomplete for LDAP with `shareapi_only_share_with_group_members` on
2020-06-23 14:02:17 +02:00
blizzz 859941db32
Merge pull request #21479 from nextcloud/fix/21474/allow_specifying_cookie_type
Allow to specify the cookie type for appframework responses
2020-06-22 13:00:12 +02:00
Roeland Jago Douma fbf9772a3e
Allow to specify the cookie type for appframework responses
In general it is good to set them to Lax. But also to give devs more
control over them is not a bad thing.

Helps with #21474

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-22 08:38:44 +02:00
Roeland Jago Douma c006b5ff2a
Fix unit test of the ResponseTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-21 09:44:56 +02:00
Arthur Schiwon de61c7d302
acceptence tests shall specify which branch to pick when cloning apps
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-06-19 21:08:39 +02:00
Christoph Wurst 2b7b7144d4
Allow crash reporters registration during app bootstrap
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-19 10:38:26 +02:00
Joas Schilling 1151394739
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-18 11:33:43 +02:00
Christoph Wurst 69571fb536
Add dedicated API for apps' bootstrapping process
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:22:21 +02:00
Christoph Wurst 68794ebc92
Emit an event for every disabled 2FA provider during cleanup
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-16 14:38:33 +02:00
Christoph Wurst 5e52c110bb
Merge pull request #21416 from nextcloud/fix/user-deleted-token-cleanup
Clean up auth tokens when user is deleted
2020-06-16 10:01:29 +02:00
Christoph Wurst 3474afa938
Clean up auth tokens when user is deleted
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-15 19:24:04 +02:00
Julius Härtl 294e40db5f
Avoid duplicate matches in wide and exact results
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-06-15 09:34:57 +02:00
Joas Schilling b6d5979d0a
Increase timeout of the appstore requests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-12 13:01:06 +02:00
Daniel Calviño Sánchez 2c6d5068ad Add acceptance test for disabling create permission after sharing
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:18:21 +02:00
Daniel Calviño Sánchez 33222d67ea Add acceptance test for sharing a folder without create permission
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:17:33 +02:00
Daniel Calviño Sánchez 573bf4d667 Add acceptance test for sharing a file without edit permission
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:15:26 +02:00
Daniel Calviño Sánchez cafa68493a Generalize functions to get locators for share permission checkboxes
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:12:20 +02:00
Robin Appelman e9b5514186
prevent the root storage from accidentally scanning user folders
while this scan *should* never be triggered, it's good to have some failsafe to ensure
that the users home contents don't end up getting scanned in the root storage

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-06-11 15:41:33 +02:00
Joas Schilling c68718f90c
Remove dropped " ON " when join has no condition
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-08 08:03:35 +02:00
Joas Schilling 69eda9c0f6
Prevent harder to share your root
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-03 14:47:38 +02:00
Roeland Jago Douma 251a4d3097
Merge pull request #21143 from nextcloud/fix-password-changes-in-link-and-mail-shares
Fix password changes in link and mail shares
2020-05-29 13:36:09 +02:00
Daniel Calviño Sánchez 45de42a6b8 Fix disabling send password by Talk without new password in mail shares
When "send password by Talk" was disabled in a mail share it was
possible to keep the same password as before, as it does not pose any
security issue (unlike keeping it when "send password by Talk" is
enabled, as in that case the password was already disclosed by mail).

However, if a mail share is updated but the password is not set again
only the hashed password will be available. In that case it would not
make sense to send the password by mail, so now the password must be
changed when disabling "send password by Talk".

Note that, even if explicitly setting the same password again along with
the "send password by Talk" property would work, this was also prevented
for simplicity.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 02:46:12 +02:00
Daniel Calviño Sánchez a426f84dbe Fix enabling send password by Talk with same password in mail shares
When "send password by Talk" is enabled in a mail share a new password
must be also set. However, when the passwords of the original and the
new share were compared it was not taken into account that the original
password is now hashed, while the new one is not (unless no new password
was sent, in which case the password of the original share was set in
the new share by the controller, but that was already prevented due to
both passwords being literally the same), so it was possible to set the
same password again.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-28 21:51:28 +02:00
Daniel Calviño Sánchez 7569590514 Fix enabling send password by Talk with empty password in link shares
When "send password by Talk" is enabled in a link share now a non empty
password is enforced.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-28 21:51:28 +02:00
Roeland Jago Douma 28f8a445e4 Move the systemtags to core/src
* Move to the handlebar loader from webpack

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-05-28 19:05:09 +00:00
Roeland Jago Douma 6aa6ab3e02
Add lazy events for the Node API
Right now if you want to get events via the Node API you have to have a
real instance of the Root. Which in turns sets up the whole FS.

We should make sure this is done lazy. Else enabling the preview
generator for example makes you setup the whole FS on each and every
authenticated call.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-28 12:35:45 +02:00
Arthur Schiwon 653162a709
use the loginname to verify the old password in user password changes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-05-26 16:53:25 +02:00
Morris Jobke 18b0d753f2
Do not read certificate bundle from data dir by default
Before the resources/config/ca-bundle.crt was only used when the list of custom
certificates was empty and the instance was not installed. But it should also
be used when the list is empty and the instance is installed.

This is inverting the logic to stop if the instance is not installed to use the
default bundle. And it also does this when the list is empty.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-25 16:57:56 +02:00
Roeland Jago Douma 44d05bf356
Move core/js/files to webpack
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-05-22 20:28:31 +02:00
Roeland Jago Douma cac844d915
Merge pull request #20814 from nextcloud/group-id-only
dont get the group details if we only ask for the id
2020-05-21 09:53:45 +02:00
Morris Jobke 8123737a40
Revert "Compress the appstore requests by default"
This reverts commit 6ffde128ad.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 13:37:28 +02:00
Morris Jobke 8bcd1c31da
Allow gzip encoded requests by default
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 13:37:28 +02:00
Morris Jobke 6ffde128ad
Compress the appstore requests by default
In test it reduced the transfered data from 5 MB to 2 MB. This should reduce the load on the appstore significantly.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 09:51:07 +02:00
Morris Jobke 3e0d8df036
Cache appstore requests for 60 instead of 5 minutes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-20 09:51:06 +02:00
Valdnet 8e3de41b4b l10n: Add "The" before "Following" 2020-05-15 14:26:50 +08:00
Roeland Jago Douma 7c15c63b05
Merge pull request #20939 from nextcloud/enh/middleware/not_modified
Move not modified check to the middleware
2020-05-13 09:04:56 +02:00
Roeland Jago Douma 4fbea316a7
Merge pull request #20897 from nextcloud/bugfix/httpcache
Proxy server could cache http response when it is not private
2020-05-13 08:27:05 +02:00
Roeland Jago Douma 12fa748c49
Move the notmodified check to middleware where it belongs
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-13 08:11:24 +02:00
Roeland Jago Douma 6374c329e3
Merge pull request #20270 from nextcloud/enh/appframework/gzip
Add AppFramework compression middleware to gzip responses
2020-05-12 12:20:39 +02:00
Clement Wong 979dd1b6f5 Fix http cache test
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-12 11:50:48 +02:00
Roeland Jago Douma 203d7eb1d3
Add AppFramework GZip middleware to gzip responses
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-12 09:09:48 +02:00
Roeland Jago Douma 35ff4aa1c6
Use random_bytes
Since we don't care if it is human readbale.
The code is backwards compatible with the old format.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-11 12:46:59 +02:00
Morris Jobke 16f4b43d94
Adjust tests to only return group IDs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-08 08:10:38 +02:00
Robin Appelman aa83b0b22d
dont get the group details if we only ask for the id
currenty when getting the groups for a user, the full group object is always created (and cached)
even if only the groupid is required

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-07 17:16:43 +02:00
Morris Jobke a93d182bac
Merge pull request #20722 from nextcloud/enh/20693/etag-capabilities
Set etag for capabilities endpoint
2020-05-04 10:22:01 +02:00
Roeland Jago Douma a41ad78408
Update education bundle
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-01 09:52:58 +02:00
Roeland Jago Douma c724eb24d5
Merge pull request #20380 from nextcloud/design/notification-mails
Fix design and layout of notification mails
2020-05-01 08:53:39 +02:00
Jan-Christoph Borchardt e981669e89
Fix notification mail tests
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2020-05-01 03:00:42 +02:00
Robin Appelman 4e6d3d1880
Fix getDirectoryContent implementation for Jail wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-30 15:27:09 +02:00
MichaIng ad60619655
Fix Argon2 options checks
The minimum for memory cost is 8 KiB per thread. Threads must be checked and set first to allow checking against the correct memory cost mimimum.
Options are now applied the following way:
- If config.php contains the setting with an integer higher or equal to the minimum, it is applied.
- If config.php contains the setting with an integer lower than the minimum, the minimum is applied.
- If config.php does not contain the setting or with no integer value, the PHP default is applied.

Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-30 10:18:46 +02:00
Daniel Kesselberg df669a2936
Set etag for capabilities endpoint
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-04-29 15:26:46 +02:00
Morris Jobke 1738e17e20
Merge pull request #19793 from nextcloud/bugfix/noid/link-to-federated-reshare
Fix resharing of federated shares that were created out of links
2020-04-27 11:05:34 +02:00
Morris Jobke a64681a0fe
Merge pull request #19514 from sndrr/already-enabled-apps
Already enabled apps
2020-04-27 11:00:16 +02:00
Morris Jobke 9b7e24a7a1
Merge pull request #19084 from nextcloud/bug/13556/wrong-paths-for-svg
Make it possible to resolve svg's outside \OC::$SERVERROOT
2020-04-27 10:58:34 +02:00
Sander Ruitenbeek 3d9cd00c7b
Updated test to check for already enabled apps
Signed-off-by: Sander Ruitenbeek <s.ruitenbeek@getgoing.nl>
2020-04-24 16:30:45 +02:00
Daniel Kesselberg d766d09f01
Add test to ensure that symlinked apps_paths are not resolved
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-04-24 16:19:14 +02:00
Daniel Kesselberg 72a16b1779
Make it possible to resolve svg for apps_paths outside the document root
Previous implementation assumes the app path is always a child \OC::$SERVERROOT. That's not always true.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-04-24 16:19:10 +02:00
Roeland Jago Douma f4b8623d33
Allow specifying a default expiration date
This overrides the max expiration date.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-24 16:18:20 +02:00
Julius Härtl 2eadf9d567
Do not create remember me cookie
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-23 19:12:54 +02:00
Roeland Jago Douma c870b6ab2e
Fix new routing in settings etc
Also prefix resources
Unify the prefix handling
Handle urls with and without slash

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-22 13:09:25 +02:00
Roeland Jago Douma 8f650feede
Merge pull request #20114 from nextcloud/techdebt/noid/allow-some-apps-to-have-root-urls
Allow some apps to have root URLs in their own routing file
2020-04-21 16:00:34 +02:00
Julius Härtl 397ab1c3c5
Remove unneeded test since links have resharing permissions by default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-21 14:35:29 +02:00
Roeland Jago Douma 6c603e8e7d
Move to subfolders for preview files
Else the number of files can grow very large very quickly in the preview
folder. Esp on large systems.

This generates the md5 of the fileid. And then creates folders of the
first 7 charts. In that folder is then a folder with the fileid. And
inside there are the previews.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-19 10:30:56 +02:00
Joas Schilling 250467e842
Extend tests for root url
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-18 11:21:28 +02:00
Roeland Jago Douma 16e6707f3f
Fix mailer test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-17 16:39:49 +02:00
John Molakvoæ 36f9ad32f2
Merge pull request #20447 from liamjack/fix/13287/welcome_email
Increase max-height on button in welcome email template
2020-04-17 09:42:49 +02:00
Morris Jobke 840bed9a85
Fix tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-04-17 09:00:59 +02:00