Skip to content

fix(tui): never pass to macos opener#111

Open
laithrw wants to merge 2 commits into
mainfrom
fix-about-this-mac
Open

fix(tui): never pass to macos opener#111
laithrw wants to merge 2 commits into
mainfrom
fix-about-this-mac

Conversation

@laithrw

@laithrw laithrw commented Jun 12, 2026

Copy link
Copy Markdown
Member
  • request_open_browser dropped its literal about:blank fallback; with no live/page url it now shows a notice instead of shelling out
  • open_external_url validates targets via new external_browser_target(): only http(s)/file urls reach open::that_detached; about:/chrome:// placeholders are rejected (macos can fuzzy-match junk open targets to app names, and "about*" uniquely resolves to About This Mac.app)
  • one test encodes the constraint; browser_panel test now seeds a real live url since the placeholder fallback is gone

Summary by cubic

Prevented placeholder and internal browser URLs from reaching the macOS opener, avoiding accidental “About This Mac” launches. We now validate targets and show a clear notice when no URL exists.

  • Bug Fixes
    • Removed about:blank fallback in request_open_browser; show an inline notice when no URL exists.
    • Added external_browser_target validation; only http(s)/file URLs reach open::that_detached (rejects about:*, chrome://*, javascript:).
    • Updated tests: added rejection tests; browser_panel test seeds a real live URL.

Written for commit 78f2628. Summary will update on new commits.

Review in cubic

…ener

- request_open_browser dropped its literal about:blank fallback; with no
  live/page url it now shows a notice instead of shelling out
- open_external_url validates targets via new external_browser_target():
  only http(s)/file urls reach open::that_detached; about:/chrome://
  placeholders are rejected (macos can fuzzy-match junk open targets to
  app names, and "about*" uniquely resolves to About This Mac.app)
- one test encodes the constraint; browser_panel test now seeds a real
  live url since the placeholder fallback is gone
@laithrw laithrw changed the title fix(tui): never pass about:blank or chrome:// targets to the macos op… fix(tui): never pass to macos opener Jun 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

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