Skip to content

fix: harden prompter popout URLs - #157

Merged
Brad-Edwards merged 1 commit into
devfrom
150-prompter-popout-url
May 24, 2026
Merged

fix: harden prompter popout URLs#157
Brad-Edwards merged 1 commit into
devfrom
150-prompter-popout-url

Conversation

@Brad-Edwards

@Brad-Edwards Brad-Edwards commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Harden the prompter popout helper so it parses target URLs through the platform URL API, forces mode=prompter, rejects cross-origin targets, and isolates the opened window from window.opener.

Requirement UIDs

  • (none - bug/refactor/maintenance run; see Traceability section below)

Related Issues

Closes #150

ADR Impact

  • None

Changes

  • Build prompter popout URLs with new URL(baseUrl, window.location.href) and searchParams.set('mode', 'prompter').
  • Reject cross-origin popout targets before calling window.open.
  • Always include noopener,noreferrer and defensively clear opened.opener when a window object is returned.
  • Expand system tests for existing mode params, query values containing mode=, hashes, relative URLs, absolute same-origin URLs, cross-origin rejection, feature isolation, and opener clearing.
  • Add a fixed changelog fragment.

Test Plan

Codex pre-push review was clean. Test-quality pre-push review was clean.

Ground Control Checks

  • Implementation plan posted
  • Completion gate passed
  • Codex review clean
  • Test-quality review clean
  • CI green
  • SonarCloud quality gate OK

Traceability

Checklist

@sonarqubecloud

Copy link
Copy Markdown

@Brad-Edwards
Brad-Edwards merged commit 3ba7e2d into dev May 24, 2026
9 checks passed
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