Skip to content

Commit

Permalink
Fix: add additional escaping to stripe onboarding (#7391)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Waldstein <[email protected]>
Co-authored-by: Jon Waldstein <[email protected]>
  • Loading branch information
3 people authored and kjohnson committed Aug 21, 2024
1 parent be07248 commit 032fc8a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function getRedirectUrl( $sessionId, $formId )
}

/**
* @unreleased add esc_attr to $session_id
* @since 2.5.5
* @since 2.19.0 Migrated from the legacy Give_Stripe_Checkout::redirect_to_checkout implementation of the Stripe Checkout Gateway.
* @return void
Expand Down Expand Up @@ -83,7 +84,7 @@ public static function maybeHandleRedirect()
// Make the id field from the Checkout Session creation API response
// available to this file, so you can provide it as parameter here
// instead of the {{CHECKOUT_SESSION_ID}} placeholder.
sessionId: '<?php echo $session_id; ?>'
sessionId: '<?php echo esc_attr($session_id); ?>'
}).then( ( result ) => {
console.log(result);
// If `redirectToCheckout` fails due to a browser or network
Expand Down

0 comments on commit 032fc8a

Please sign in to comment.