Conversation
…list validation Agent-Logs-Url: https://github.com/numbersprotocol/capture-cam/sessions/d25025b1-af37-4689-84c5-a319e266346e Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix open redirect vulnerability in action details page
Fix open redirect vulnerability in action-details via URL allowlist validation
Apr 2, 2026
The redirectToExternalUrl method subscribes to id$ observable internally. Positive tests need fakeAsync+tick to flush the observable before asserting Browser.open was called. Also fixes Prettier formatting.
by Olga Shen & Omni
by Olga Shen & Omni
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
redirectToExternalUrl()passedaction.ext_action_destination_textdirectly toBrowser.open()without validation, enabling open redirect attacks via a compromised or MITM'd backend response — with CID and order_id leaked to the malicious target.Changes
Allowlist validation — added
ALLOWED_DOMAINS(captureapp.xyz,numbersprotocol.io) andisValidRedirectUrl()that enforces HTTPS and strict hostname matching:Uses
hostname === d || hostname.endsWith('.' + d)to allow legitimate subdomains while blocking spoofs likeevil-captureapp.xyzorcaptureapp.xyz.evil.com.Error handling —
redirectToExternalUrl()now returns early with an error toast on invalid URLs; i18n keys added toen-us.jsonandzh-tw.jsonTests — added cases covering: valid apex/subdomain, HTTP rejection, non-allowlisted domain, subdomain confusion attack, lookalike domain, and malformed URL
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node node index.js --exec install conf�� --global credential.helper cal/bin/git HooksPath(dns block)If you need me to access, download, or install something from one of these locations, you can either: