Skip to content

[stable35] fix(share): allow viewing files in shares with download disabled - #9586

Merged
mejo- merged 6 commits into
stable35from
backport/9581/stable35
Nov 16, 2026
Merged

mejo- merged 6 commits into
stable35from
backport/9581/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Backport of #9581

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
backportbot Bot requested review from blizzz and mejo- November 10, 2026 15:14
@backportbot backportbot Bot added bug Something isn't working 3. to review feature: sharing AI assisted This PR contains AI-assisted commits labels Nov 10, 2026
@backportbot backportbot Bot added this to the Nextcloud 35.0.3 milestone Nov 10, 2026
@mejo-
mejo- force-pushed the backport/9581/stable35 branch from 7873ab2 to 3fd5d58 Compare November 10, 2026 15:22
@mejo-
mejo- marked this pull request as ready for review November 10, 2026 15:23
Text refused to open files from shares with the download permission
disabled, including the folder description (Readme.md) of shared
folders and attachments in such files.

Use `IShare::canSeeContent()` to decide whether Text may show a file
and its attachments. Copying a file into the attachment folder still
requires the download permission, as WebDAV COPY and MOVE do on the
server.

Migrate the share e2e tests from Cypress to Playwright and test both
values of the admin setting.

Fixes: #7023

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
…scription

Only return the content of the folder description in the rich
workspace PROPFIND properties if `canSeeContent()` allows viewing the
Readme.md, as the editor already does. Otherwise the folder
description preview showed content that the editor then refused to
open.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
Files opened through a link share are resolved via the share owner's
storage, so checking the file's storage never found the share. Check
the link share itself when building the file context, and recognize
any shared storage, including the one used by public WebDAV.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the backport/9581/stable35 branch from 3fd5d58 to 6a3dc40 Compare November 10, 2026 15:40
@mejo-

mejo- commented Nov 10, 2026

Copy link
Copy Markdown
Member

/backport! to stable34

On stable35 the viewer dialog of a public single file share has no
accessible name, as the opened file is the share root `/`.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
The rich-workspace DAV properties embed the folder's Readme.md content
in the multistatus response as is. Control characters, U+FFFE/U+FFFF or
invalid UTF-8 (e.g. a Readme.md left behind encrypted after disabling
server-side encryption) make the whole response malformed, so strict
clients like the iOS app fail to show the folder listing. NUL bytes also
silently truncate the property value.

Decode the content to UTF-8 the same way the editor does and replace
characters that cannot be represented in XML 1.0 with U+FFFD.

Fixes: #9511

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
[stable35] fix(workspace): replace XML-invalid characters in rich workspace content
@mejo-
mejo- merged commit e0a8f1d into stable35 Nov 16, 2026
69 checks passed
@mejo-
mejo- deleted the backport/9581/stable35 branch November 16, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits bug Something isn't working feature: sharing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants