Skip to content

Security: fix Stripe registration payment bypass - #448

Open
polevaultweb wants to merge 2 commits into
developfrom
security/stripe-registration-payment-bypass
Open

Security: fix Stripe registration payment bypass#448
polevaultweb wants to merge 2 commits into
developfrom
security/stripe-registration-payment-bypass

Conversation

@polevaultweb

@polevaultweb polevaultweb commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix server-side enforcement of Stripe plan selection during registration
  • Prevent account creation in AJAX path when plan field is missing

Changes

  • Mark wpum_stripe_plan as required => true when Stripe products are configured
  • Move plan validation before user creation in the AJAX registration handler
  • Remove redundant post-creation check

Test plan

  • Register on a form with Stripe products configured — plan selection should be required
  • Register on a form without Stripe products — should work as before
  • StripePaymentBypassTest passes (4 new tests)

🤖 Generated with Claude Code

polevaultweb and others added 2 commits July 24, 2026 18:31
The Stripe plan field was injected with required=false, allowing
unauthenticated users to bypass payment by submitting the registration
form directly without the wpum_stripe_plan POST field. The user was
created without plan metadata, and the access control model treated
missing metadata as paid/allowed.

- Mark wpum_stripe_plan as required when Stripe products are configured
- Move plan check before user creation in the AJAX registration handler
- Add StripePaymentBypassTest covering field requirement and bypass path

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cover single-product, multi-product, and filtered-options scenarios
to ensure the required field works correctly in all configurations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant