fix: add rel="noopener noreferrer" to all target="_blank" links in modal#90
Draft
fix: add rel="noopener noreferrer" to all target="_blank" links in modal#90
Conversation
Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Security] Fix missing rel="noopener noreferrer" on target="_blank" links
fix: add rel="noopener noreferrer" to all target="_blank" links in modal
Mar 17, 2026
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.
All
<a target="_blank">links inmodal.tslackedrel="noopener noreferrer", exposing the app to reverse tab-napping — opened pages could accesswindow.openerand redirect the parent to a phishing site.Changes
src/modal/modal.ts— Addedrel="noopener noreferrer"to every<a target="_blank">element:renderCreatorOrAssetSourceType()— showcase linkrenderTop()— profile image linkrenderTransaction()— blockchain explorer URL linkrenderDefaultProvenanceZone()— Numbers mainnet explorer linkrenderCustomProvenanceZone()—item.urllinksrenderBottom()— action button and "Powered by Numbers Protocol" linksrenderEngagementZone()— engagement zone linksrc/test/modal_test.ts— Updated snapshot assertions to reflect the new attribute.Note:
handleInspectContentCredentialsalready usedwindow.open(url, '_blank', 'noopener,noreferrer')correctly — only the<a>tags were affected.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:
example.com/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl de_modules/.bin/node(dns block)/home/REDACTED/.cache/ms-playwright/firefox-1509/firefox/firefox /home/REDACTED/.cache/ms-playwright/firefox-1509/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-Rnwv9a -juggler-pipe -silent cal/bin/git(dns block)static-cdn.numbersprotocol.io/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl de_modules/.bin/node(dns block)/home/REDACTED/.cache/ms-playwright/firefox-1509/firefox/firefox /home/REDACTED/.cache/ms-playwright/firefox-1509/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-Rnwv9a -juggler-pipe -silent cal/bin/git(dns block)via.placeholder.com/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl de_modules/.bin/node(dns block)/home/REDACTED/.cache/ms-playwright/firefox-1509/firefox/firefox /home/REDACTED/.cache/ms-playwright/firefox-1509/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-Rnwv9a -juggler-pipe -silent cal/bin/git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.