Commit Graph

1330 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez 7e87b12271 Fix valid storages removed when cleaning remote storages
The remote URL of a share is always stored in the database with a
trailing slash. However, when a cloud ID is generated trailing slashes
are removed.

The ID of a remote storage is generated from the cloud ID, but the
"cleanup-remote-storage" command directly used the remote URL stored in
the database. Due to this, even if the remote storage was valid, its ID
did not match the ID of the remote share generated by the command and
ended being removed.

Now the command generates the ID of remote shares using the cloud ID
instead, just like done by the remote storage, so there is no longer a
mismatch.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-18 08:05:04 +00:00
Morris Jobke 0e642a5f5e
Merge pull request #26062 from nextcloud/backport/25915/stable21
[stable21] Add appconfig to always show the unique label of a sharee
2021-03-17 20:13:07 +01:00
Morris Jobke 4b3684fbc4
Merge pull request #25943 from nextcloud/backport/25659/stable21
[stable21] catch notfound and forbidden exception in smb::getmetadata
2021-03-17 13:50:39 +01:00
Morris Jobke 120aefb795
Merge pull request #26133 from nextcloud/backport/25136/stable21
[stable21] do cachejail search filtering in sql
2021-03-16 16:59:29 +01:00
Robin Appelman ec0985ba68 fix search in nested jails
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-15 17:51:33 +00:00
Vincent Petry f109677856 Log exceptions when creating share
Because the exceptions don't always contain a useful message for the UI,
but also because in some cases we need to find out what went wrong.

In some setups, a ShareNotFoundException might happen during creation
when we try to re-read the just written share. Usually related to Galera
Cluster where node syncing wait is not enabled.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-15 15:06:16 +00:00
Julius Härtl cd5e27e3f3
Add appconfig to always show the unique label of a sharee
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-03-11 15:32:26 +01:00
Robin Appelman 67d62a820c catch notfound and forbidden exception in smb::getmetadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-05 07:51:47 +00:00
Christoph Wurst c1d4f8161b
Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-12 14:09:13 +01:00
Morris Jobke 24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-11 13:14:41 +01:00
Christoph Wurst 8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +01:00
Julius Härtl 39c67d9868
Merge pull request #24829 from nextcloud/bugfix/24813/add-missing-migrations 2021-01-05 09:32:33 +01:00
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +01:00
Vincent Petry 6c0de14b4c
Also add missing oc_share_external.share_type column
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-12-23 16:20:01 +01:00
Vincent Petry 07bf663f4c
Adjust share_external table
Add column "parent" if missing.
Drop column "lastscan" if exists.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-12-23 15:44:32 +01:00
Roeland Jago Douma adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
Unify links to php.net
2020-12-22 09:53:31 +01:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Arthur Schiwon d8ad4ef6b5
use a consistent default value for sharing.maxAutocompleteResults
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-12-15 11:53:39 +01:00
Julius Härtl 102402bfcb
Show unique displayname context in the user share list entries
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:14:59 +01:00
Roeland Jago Douma 3c693db0ca
Merge pull request #24605 from nextcloud/enh/share-deck
Add deck share provider support
2020-12-10 14:30:08 +01:00
Julius Härtl c4ea37b8a1
Address minor comments
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 15:51:41 +01:00
Julius Härtl 53bb44c09f
Include deck shares in sharing mounts
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:24 +01:00
Julius Härtl f3150f29a7
Introduce deck share type to ShareAPIController
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:24 +01:00
Julius Härtl e906138d8d
Let sharees endpoint properly handle deck shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:23 +01:00
Julius Härtl aefe826202
Adjust default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:06:10 +01:00
Julius Härtl 98deb1bd07
Do not register share menu in cases where the files app has not been registered yet
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:05:53 +01:00
Julius Härtl 8f6c2ec357
Move columns to bigint
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:05:53 +01:00
Julius Härtl bb21e87d23
Migrate files_sharing to migrations and move remote_id to a string in share_external
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:05:52 +01:00
Julius Härtl f68f67f354
Move remoteId of remote reshares to string
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:03:24 +01:00
Morris Jobke 46f406a8be
Merge pull request #24017 from nextcloud/enh/share_expiration
Make the expire shares cron job actually expire the shares
2020-11-19 23:20:47 +01:00
Roeland Jago Douma 220bc1f218
Make the expire shares cron job actually expire the shares
Right now we just delete the shares from the DB. Which is efficient
sure. But doesn't trigger any real cleanup. So no Admin audit entries or
any other post processing is done.

This makes sure we really trigger this.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-19 10:51:51 +01:00
Roeland Jago Douma eab4f3dc76
Limit shared cache search if it is just a file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-19 09:15:02 +01:00
Maxence Lange 28252594a2 circleId too short in some request
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2020-11-13 08:59:22 -01:00
Morris Jobke dc479aae2d
Improve CertificateManager to not be user context dependent
* removes the ability for users to import their own certificates (for external storage)
* reliably returns the same certificate bundles system wide (and not depending on the user context and available sessions)

The user specific certificates were broken in some cases anyways, as they are only loaded if the specific user is logged in and thus causing unexpected behavior for background jobs and other non-user triggered code paths.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-03 00:13:01 +01:00
Roeland Jago Douma 22f04a7cc3
Fix invalid usages of the new dispatcher
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-29 20:15:04 +01:00
Morris Jobke 0390a90d70
Return correct error message on share download without read permission
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-26 16:22:27 +01:00
John Molakvoæ (skjnldsv) 620be7dc22
Also expire share type email
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-20 10:20:26 +02:00
Morris Jobke 7525fb3408
Merge pull request #23350 from st3iny/fix/14849/share-api-preview-availability
Inidicate preview availability in share api responses
2020-10-13 17:27:27 +02:00
Richard Steinmetz 89f7e2ab64
Indicate preview availability in share api responses
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2020-10-13 14:12:42 +02:00
John Molakvoæ (skjnldsv) 698d4f55f2
Expose CLOUD federation for local users as well
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-12 15:17:14 +02:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
John Molakvoæ (skjnldsv) 6adb19b296
Show filename on share link download
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-09-17 19:55:47 +02:00
J0WI 68ce17e59b Unify links to php.net
Update all links to https://www.php.net/

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-09-17 17:40:04 +02:00
Morris Jobke c9639f3956
Merge pull request #22898 from nextcloud/fix/16696/add-spaces-and-fix-variable-name
Fix variable name and add spaces around path in info log line
2020-09-17 11:55:07 +02:00
Morris Jobke 681e51c0ef
Merge pull request #22902 from nextcloud/fix/16696/proper-target-path-for-share-event
Create proper target path for shared storage fopen event
2020-09-17 11:53:28 +02:00
Morris Jobke 5eb808b763
Create proper target path for shared storage fopen event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 09:52:31 +02:00
Morris Jobke 930c97a0ef
Fix variable name and add spaces around path in info log line
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 08:58:10 +02:00
Robin Appelman cfde74442c
optimize View::getPath if we already know the storage id
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-16 13:49:07 +02:00
Robin Appelman 244fd6ae49
disable update checking for shared storages
update checking is already handled by the share source

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-15 16:42:40 +02:00
Robin Appelman 928cee2ae7
only get the permissions from the share source if it's not already cached
this prevents having to setup the share source when doing metadata stuff on the share root

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-09 13:48:48 +02:00