Open
Conversation
…payment form Changed aria-disabled to disabled attribute on submit button to properly prevent form submission at the DOM level instead of just as an accessibility hint. This fixes a race condition where users could click the submit button multiple times due to async state update delays, causing duplicate payment charges. The vulnerability occurred because: 1. aria-disabled only hints to screen readers that button is disabled 2. React state updates are batched, so there's a window where the button appears disabled but is still clickable 3. A second click would trigger another transactionInitialize() with the updated checkout amount, creating two separate PaymentIntents and charging the customer twice This fix prevents the form from being submitted at the HTML level once isLoading is true, eliminating the race condition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Differences Found✅ No packages or licenses were added. SummaryExpand
|
99bcc3e to
581fd76
Compare
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.
Features: