-
-
Notifications
You must be signed in to change notification settings - Fork 6
Update Stripe payment links #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ interface PurchaseCreditsPopupProps { | |
|
|
||
| export function PurchaseCreditsPopup({ isOpen, onClose }: PurchaseCreditsPopupProps) { | ||
| const handlePurchase = () => { | ||
| window.open('https://buy.stripe.com/3cIaEX3tRcur9EM7tbasg00', '_blank'); | ||
| window.open('https://buy.stripe.com/14A3cv7K72TR3go14Nasg02', '_blank'); | ||
| onClose(); | ||
| }; | ||
|
Comment on lines
21
to
24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
SuggestionPass window features to enforce window.open(STRIPE_PAYMENT_LINK_URL, '_blank', 'noopener,noreferrer');Optionally: export function openExternal(url: string) {
window.open(url, '_blank', 'noopener,noreferrer');
}Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this change. |
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ export function UsageView() { | |
| <div className="p-4 border rounded-xl space-y-4"> | ||
| <div className="flex justify-between items-center"> | ||
| <span className="italic font-medium text-lg">Free</span> | ||
| <Button size="sm" className="rounded-full px-4" onClick={() => window.open('https://buy.stripe.com/3cIaEX3tRcur9EM7tbasg00', '_blank')}> | ||
| <Button size="sm" className="rounded-full px-4" onClick={() => window.open('https://buy.stripe.com/14A3cv7K72TR3go14Nasg02', '_blank')}> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Reverse tabnabbing (via
|
||
| Upgrade | ||
| </Button> | ||
|
Comment on lines
+35
to
37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same SuggestionUpdate the call to include onClick={() => window.open(STRIPE_PAYMENT_LINK_URL, '_blank', 'noopener,noreferrer')}Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this change. |
||
| </div> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
reverse tabnabbing prevention window.open _blank noopener noreferrer modern browsers best practice💡 Result:
Reverse tabnabbing happens when a newly opened page can control the opener via
window.opener(e.g., redirect it to a phishing page). The fix is to ensure the new page does not get an opener reference. [5]Best practice (modern browsers)
1) For links (
<a target="_blank">)Use
rel="noopener"(orrel="noreferrer"if you also want to suppress theRefererheader):rel="noopener"preventswindow.openerfrom being set. [1]rel="noreferrer"also impliesnoopenerand additionally removes theRefererheader. [2]target="_blank"implicitly behaves likerel="noopener", but it’s still common to set it explicitly for clarity/defense-in-depth (and for any non-evergreen/embedded browsers you might still care about). [1], [5]2) For
window.open()Pass
noopener(ornoreferrer) in the features string:MDN documents both
noopenerandnoreferreras supportedwindowFeatures, and notes thatnoreferreralso enablesnoopener. [2]3) Platform-level hardening (optional, stronger isolation)
Set Cross-Origin-Opener-Policy to separate browsing context groups and sever opener references more broadly:
Cross-Origin-Opener-Policy: same-origin(commonly used) prevents settingopenerin relevant cases. [3], [4]4) Only use an opener when you truly need it
Modern browsers generally don’t give
_blankan opener unless explicitly requested (e.g.,rel="opener"), so only opt into that when required. [3]🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 93
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 986
Harden
window.openagainst reverse‑tabnabbing.The purchase flow opens a third‑party Stripe URL with
_blank, exposingwindow.openerto potential phishing attacks. Addnoopener,noreferrerto the features parameter to prevent opener access:🔒 Proposed fix
🤖 Prompt for AI Agents