Skip to content

Conversation

@david1alvarez
Copy link
Contributor

Because:

  • Users can currently view any cart by pasting the link to the cart in the URL

This commit:

  • Adds in a requirement for fetching the cart where if the cart has an associated uid, the correct user must be logged in
  • Unauthorized users are shown the subplat 404 page, which allows for them to restart the checkout process

Closes #PAY-3155

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Because:

* Users can currently view any cart by pasting the link to the cart in the URL

This commit:

* Adds in a requirement for fetching the cart where if the cart has an associated uid, the correct user must be logged in

Closes #PAY-3155
@david1alvarez david1alvarez requested a review from a team as a code owner December 5, 2025 00:31
Comment on lines 58 to +62
async function getCartOrRedirectAction(
cartId: string,
page: SupportedPages,
searchParams?: Record<string, string | string[]>
searchParams?: Record<string, string | string[]>,
uid?: string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK someone can call this action with any UID they want as the last param, nullifying the security of this endpoint.

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.

3 participants