Commit graph

1790 commits

Author SHA1 Message Date
Robin Appelman
d0a61c6bc2
chore: psalm fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-21 22:05:39 +02:00
Robin Appelman
aa8e95134d fix: redact share token if share has more permissions than the current user
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-21 15:58:00 +00:00
Ferdinand Thiessen
bd562614cf
fix: use canDownload for permissions on federated shares
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-03-17 23:13:49 +01:00
Ferdinand Thiessen
7c6f496b6b
fix(files_sharing): make legacy downloadShare endpoint compatible with legacy behavior
This needs to be able to directly download files if specified to only
download a single file and not a folder.
Also it was possible to either pass a files array json encoded or a
single file not encoded at all.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-20 19:43:49 +01:00
Côme Chilliet
da09f3622c chore: fix or suppress psalm errors for BeforeZipCreatedEvent
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-01-20 15:09:04 +00:00
Côme Chilliet
432359b555 fix(files_sharing): Switch back event path to be relative to user folder
This is clearly the original intent, the parameter name in ViewOnly is
 $userFolder, and the similar event for single file download uses
 paths relative to user folder as well.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-01-20 15:09:04 +00:00
Côme Chilliet
c3901f24dd fix(files_sharing): Fix BeforeZipCreatedListener path handling
Path of directory is relative to root folder, not user folder.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-01-20 15:09:04 +00:00
Benjamin Gaussorgues
04f9139bd3 chore: add chunked queries on occ sharing:delete-orphan-shares
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-01-08 08:50:29 +00:00
nfebe
8725129312 fix(sharing): Allow reasonable control 4 'Hide download' on fed shares
When creating public links from federated shares, users should be able to set
the 'Hide download' option independently as long as they are more restrictive
than the original share permissions.

Previously, the `checkInheritedAttributes` method was ignoring user preferences
and always overriding the hideDownload setting based solely on inherited
permissions, preventing users from disabling downloads even when the parent
share allowed them.

This fix implements some sort of inheritance logic:
- Users can only be MORE restrictive than parent shares, never LESS restrictive
- If parent hides downloads -> child MUST hide downloads (enforced)
- If parent allows downloads -> child can CHOOSE to hide or allow downloads
- If parent forbids downloads entirely -> child cannot enable downloads

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-11-28 13:42:45 +01:00
Côme Chilliet
cf398cff76 chore: Improve wording in debug log
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2025-11-25 10:47:03 +00:00
Côme Chilliet
8aba726ee9 fix(files_sharing): Allow deleting a share of a missing file
This can happen in various scenarios, we should allow the user to delete
 the share in this situation.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-11-25 10:47:03 +00:00
Git'Fellow
63fb254b6b
Merge pull request #55962 from nextcloud/backport/55955/stable31
Some checks failed
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable31, 8.1, stable31, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Has been cancelled
Psalm static code analysis / static-code-analysis-security (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ocp (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ncu (push) Has been cancelled
[stable31] fix(dav): allow multiple link shares token in session
2025-11-15 13:11:20 +01:00
nfebe
033b54934b fix(files_sharing): Only send password on change
The password param should never be sent if the intention is not

remove it or update it.

This commit adapts the frontend and backend to this rule to avoid weird bugs

especially around updating new shares.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-10-30 13:44:37 +01:00
Daniel
d0916e3097
Merge pull request #55985 from nextcloud/backport/55529/stable31
[stable31] fix: make share recursion error more informative
2025-10-28 21:17:21 +01:00
Joas Schilling
21651a2e0b
fix(federation): Increase the size of owner to allow oCIS cloud ids
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-10-27 16:38:48 +01:00
Robin Appelman
a09715c69e fix: make share recursion error more informative
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-10-24 12:21:05 +00:00
skjnldsv
68727491e0 fix(dav): allow multiple link shares token in session
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-10-23 16:16:37 +02:00
nfebe
b4b9b7dbca refactor(ShareApiController): Streamline share providers & add error logging
1. Consolidated the repetitive provider code into a clean loop
2. Added exception handling to log unexpected errors

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-10-01 16:26:11 +00:00
Louis Chemineau
ff6d316fd6 feat(file_sharing): Provide template creator list in public shares
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-11 16:10:31 +02:00
Robin Appelman
251424aaa8 feat: allow filtering sharing:delete-orphan-shares by share owner or target
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-28 13:29:30 +00:00
nfebe
2533bb5052 fix(files_sharing): Implementation conditional federation placeholder
This commits addresses an annoyance where the share input placeholder would

suggest sharing via federated cloud ID even if federation was disabled.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-08-20 00:25:35 +02:00
provokateurin
efbb3316d9 fix(files_sharing): Also hide own reshares in shared with me section
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-08-18 10:40:41 +00:00
nfebe
dea8324912 feat(files_sharing): Toggle display for trusted server shares
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-08-01 12:18:36 +01:00
Ferdinand Thiessen
be3f0e7ce9 fix(files_sharing): ensure share folder exists in the settings
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-07-17 21:16:51 +00:00
John Molakvoæ
daf3084138
Merge pull request #53715 from nextcloud/backport/52792/stable31 2025-07-02 22:59:50 +02:00
provokateurin
0cf2295516
fix(files_sharing): Hide own reshares
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-01 13:08:14 +02:00
John Molakvoæ (skjnldsv)
15bfb90adf fix(files_sharing): add mime fallback to public preview too
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2025-06-28 09:27:20 +02:00
nfebe
ae56da1375 fix: Set public link upload email notification to opt-in
This now sets `isDefaultEnabled` to false. This makes email notifications for file uploads
to public links disabled by default (opt-in) for users.

This addresses concerns about new notifications being enabled by
default for existing users, leading to unexpected emails.

Related: https://github.com/nextcloud/server/pull/46945

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-06-17 14:58:31 +00:00
Maxence Lange
ba6d74b6de fix(share): assume download enabled on federated share
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2025-05-29 14:52:00 +02:00
Ferdinand Thiessen
e51e4d6c3e
fix(files_sharing): show note, label and list of uploaded files on file drop
This was missing from the Vue migration of the public share view:
- Show the note as the description of the file drop
- Show the label as the heading of the file drop if available
- Show list of uploaded files for verification

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-26 14:14:40 +02:00
Louis Chemineau
617af2f3cc fix: Replace the deprecated direct download link with the public DAV endpoint
Follow-up of #48098

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-05-22 08:30:36 +00:00
Robin Appelman
9a52cfc25e
Merge pull request #52689 from nextcloud/backport/52133/stable31
[stable31] fix: disable direct download for shares
2025-05-16 10:23:24 +02:00
Robin Appelman
465486e335 fix: fix unjailedroot of nested jails if there are other wrappers in between
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 14:57:05 +02:00
Robin Appelman
9f77860b54 fix: disable direct download for shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 13:14:31 +00:00
nfebe
80c901a08a fix(files_sharing): Move ConfigLexicon to Config dir, update sharing input
- Fix autoloading for new `ConfigLexicon`
- Ensure that sharing input in sharing tab respect `show-federated-shares-as-internal`:
This is important, because when federated shares are shown as internal the users should add them from the internal shares section

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-05-06 15:53:07 +01:00
Maxence Lange
cac0f1cdcd refactor: use config lexicon
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2025-05-06 15:37:34 +01:00
nfebe
67ef7e1653 feat(files_sharing): Add toggle for federated share display area
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-05-06 15:37:34 +01:00
skjnldsv
206f9fba0b fix(files_sharing): bring back owner and ownerDisplayName initial state
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-30 09:32:15 +00:00
Ferdinand Thiessen
2f7e0dc09b revert: do not unify hide-download and prevent-download permissions
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-27 14:26:16 +02:00
Ferdinand Thiessen
c412f2ab72 fix(files_sharing): do not show download button if hide-download is enabled
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-27 14:26:16 +02:00
John Molakvoæ
3f528a2726 fix(files_sharing): adjust rate limit share creation to 20 over 10 minutes
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2025-04-15 08:58:17 +00:00
skjnldsv
aec6eeb5b8 fix(files_sharing): rate limit share creation 10 times per 10 minutes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-15 08:58:17 +00:00
skjnldsv
f81ef274dd fix(files_sharing): fix share creation error handling
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-09 15:22:32 +00:00
Marcel Klehr
0273b4d0ba perf(sharing): Use oc_share.{item_type, share_type} IN instead of OR equals
to improve performance by using the db index

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-03-28 14:46:30 +01:00
Côme Chilliet
8b41055297
fix(files_sharing): Use session id as part of cache key to avoid concurrency issues
If several people are watching and seeking the same video file we do not
 want the cache key to be the same or it would flood activity again.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-27 12:19:02 +01:00
Côme Chilliet
d9b2178ee1
fix(files_sharing): Set higher priority for listeners that may abort the request
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-27 12:18:56 +01:00
Côme Chilliet
0c293b3569
fix: Avoid triggering several activities for Range request on the same file
Avoids flooding activities when someone browse a video in the web player.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-27 12:18:51 +01:00
Côme Chilliet
97dbbe4768
fix: Fix download activity for folders
Remove duplicate activity publishing from share controller download,
 listen to BeforeZipCreatedEvent to publish activity for folders, and
 cache folders activity to avoid sending activity for each file in the
 folder.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-27 12:18:46 +01:00
Côme Chilliet
6ff8d1e43b
fix(sharing): Publish activity for download by public link
Even if dav endpoint is now used.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-27 12:18:23 +01:00
Luka Trovic
833ec55728 fix(files_sharing): skip expiration notify for invalid share record
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-03-21 07:15:49 +01:00