Skip to content

fix: guard share attribute parse#5806

Open
rikled wants to merge 1 commit into
mainfrom
fix/shareattrparse
Open

fix: guard share attribute parse#5806
rikled wants to merge 1 commit into
mainfrom
fix/shareattrparse

Conversation

@rikled

@rikled rikled commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Assisted-by: Claude Code:Opus 4.8

  • Target version: main

Summary

The file picker's filter calls JSON.parse(node.attributes['share-attributes']) unconditionally, but the picker's default PROPFIND never requests share-attributes, so it's always undefined. JSON.parse(undefined) throws "unexpected character at line 1 column 1", breaking image insertion for every node. This guards the parse, defaulting to allowing download when the attribute is absent.

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Assisted-by: Claude Code:Opus 4.8
@rikled rikled marked this pull request as ready for review June 30, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant