Repository navigation
feat(go): allowlist the webext nudge src - #93
Open
TimeToBuildBob wants to merge 1 commit into
Open
TimeToBuildBob wants to merge 1 commit into
TimeToBuildBob wants to merge 1 commit into
Conversation
aw-watcher-web#247 ships a popup nudge linking to /go/?src=webext. That tag was not in SRC_DEFAULT, so KNOWN_SRC classified it as 'other': the GA4 nudge_click event lost the surface dimension, and the Stripe client_reference_id carried 'other' through the subscribe hop, making the paid attribution indistinguishable from unknown traffic. Registering 'webext' fixes both hops with one entry. Git-Session-Id: e859b72c-b2c5-4d17-858a-93c853302800
Contributor
Author
|
Executed the page's actual redirect script in a Node
So after this merges, |
This branch has not been deployed
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.
Problem
ActivityWatch/aw-watcher-web#247 ships a popup nudge that links to
https://activitywatch.net/go/?src=webext.webextis not inSRC_DEFAULT, andKNOWN_SRCis derived from it, so the sanitizer classifies the tag asother:nudge_clickevent recordssrc=other, losing the surface dimension for the ~40k weekly-active browser-extension users;from=otherto/subscribe, so the Stripe Checkout Session getsclient_reference_id=otherand the paid attribution is indistinguishable from unknown traffic.The redirect's design already does the right thing for every other registered surface; the extension nudge was simply never added to the taxonomy.
Change
One entry:
"webext": "subscribe"inSRC_DEFAULT, with a comment naming the caller. No routing, allowlist, or vendor change — the open-redirect guard and theotherfallback are untouched.Verification
webextis present exactly once inSRC_DEFAULT; 31 entries, no duplicate keys.KNOWN_SRC = Object.keys(SRC_DEFAULT), so the tag now survives sanitization (rawSrcalready permits[a-z0-9-], whichwebextsatisfies)./go/?src=webext→/subscribe?from=webext→ Stripeclient_reference_id=webext, and the GA4 event carriessrc=webext.Merge order does not matter: the entry is inert until a link uses it.