Skip to content

[stable-0.1] fix(editor): accept http(s) addresses for linked images - #425

Merged
AndyScherzinger merged 1 commit into
stable-0.1from
backport/421/stable-0.1
Oct 22, 2026
Merged

AndyScherzinger merged 1 commit into
stable-0.1from
backport/421/stable-0.1

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Backport of #421 to stable-0.1. Fixes #178 for Nextcloud 32–35.

The "Linked image" dialog rejected every http:// and https:// address because of a broken regex in the vendored editor. It now accepts addresses that start with http://, https:// or data:. Images from other servers are still blocked by the editor's Content Security Policy, the same as on main. This is wrong, see the correction.

Cherry-picked without changes. I have not yet tested it in a running Nextcloud.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

The image dialog only accepted an address when a word character followed
the scheme's colon, so every http:// and https:// address was marked
invalid and the dialog could not be confirmed. Accept addresses starting
with http://, https:// or data:.

Fixes #178

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
(cherry picked from commit f95f0f6)
@AndyScherzinger AndyScherzinger added bug Something isn't working AI assisted This PR contains AI-assisted commits labels Oct 21, 2026
@AndyScherzinger AndyScherzinger added this to the v0.1.5 milestone Oct 21, 2026
@AndyScherzinger
AndyScherzinger merged commit a0c9732 into stable-0.1 Oct 22, 2026
7 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/421/stable-0.1 branch October 22, 2026 16:32
@AndyScherzinger

Copy link
Copy Markdown
Member Author

Correction to the description: images from other servers are not blocked. The editor iframe's Content Security Policy allows images from any origin (DisplayController::showMindmapViewer() calls addAllowedImageDomain('*')), so with this fix linked external images display as well, not only images from the Nextcloud server itself and data: URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant