Skip to content

fix(attachments): normalize attachment names to Unicode NFC - #9388

Merged
mejo- merged 1 commit into
mainfrom
fix/normalize_nfd_attachment_names
Oct 15, 2026
Merged

mejo- merged 1 commit into
mainfrom
fix/normalize_nfd_attachment_names

Conversation

@mejo-

@mejo- mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member

Files uploaded from macOS in Chrome or Firefox have NFD names, while the filecache, and therefore the attachment list, stores names in NFC. The upload response returned the raw NFD name, so the editor inserted an NFD src. AttachmentResolver compared names exactly, found no matching attachment and fell back to loading the file as an image, which failed.

Normalize uploaded names to NFC before saving them, and compare names in NFC in AttachmentResolver so that documents that already contain NFD srcs resolve as well.

Fixes: #7873
Refs: nextcloud/server#65514
Fixes: nextcloud/collectives#2327

Assisted-by: ClaudeCode:claude-opus-5-5

馃弫 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@mejo- mejo- self-assigned this Oct 15, 2026
@mejo-
mejo- requested a review from max-nextcloud as a code owner October 15, 2026 06:13
@mejo- mejo- added the bug Something isn't working label Oct 15, 2026
@mejo-
mejo- requested a review from silverkszlo as a code owner October 15, 2026 06:13
@github-project-automation github-project-automation Bot moved this to 馃Л Planning evaluation (don't pick) in 馃摑 Productivity team Oct 15, 2026
@mejo-

mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

/backport to stable35

@mejo-

mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

/backport to stable34

@mejo-

mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

/backport to stable33

Files uploaded from macOS in Chrome or Firefox have NFD names, while the
filecache, and therefore the attachment list, stores names in NFC. The
upload response returned the raw NFD name, so the editor inserted an NFD
`src`. AttachmentResolver compared names exactly, found no matching
attachment and fell back to loading the file as an image, which failed.

Normalize uploaded names to NFC before saving them, and compare names
in NFC in AttachmentResolver so that documents that already contain NFD
srcs resolve as well.

Fixes: #7873
Refs: nextcloud/server#65514
Refs: nextcloud/collectives#2327

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the fix/normalize_nfd_attachment_names branch from 2ef66fa to 2c88e49 Compare October 15, 2026 06:26
@mejo- mejo- moved this from 馃Л Planning evaluation (don't pick) to 馃憖 In review in 馃摑 Productivity team Oct 15, 2026
@mejo-
mejo- merged commit c51da91 into main Oct 15, 2026
67 of 69 checks passed
@mejo-
mejo- deleted the fix/normalize_nfd_attachment_names branch October 15, 2026 09:31
@github-project-automation github-project-automation Bot moved this from 馃憖 In review to 鈽戯笍 Done in 馃摑 Productivity team Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Failed to load Attachment with "German" Umlauts Attachment filenames from macOS fail due to missing NFC normalization in Text app

2 participants