The Prompt BakeryTemplates and prompts

Fix · Sign-in and accounts

A logged-in user can see another user's data

UrgentSecurity

What you may see

  • Changing the number in the address shows someone else's order or profile
  • A customer saw another customer's details

Most likely cause

The server finds a record by its number without checking that it belongs to the person asking.

Check first (about two minutes)

  1. Sign in as test user A, open an address with test user B's record number: is the data shown?

The fix prompt

What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.

Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.

Prompt language

Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.

After you tried it, did it work?

Steps

  1. List every page, API route and action that takes an id (orders, profiles, files, invoices).
  2. For each, make the SERVER check that the record belongs to the signed-in user (or the user has a staff role), and reply "not found" otherwise; add database rules (row level security) as a second wall.
  3. Use long random ids for anything shown in addresses (not 1, 2, 3).
  4. Add tests with two test users that try to read, change and delete each other's records.

Do not do this

  • Do not rely on hiding links.
  • Do not test with real customers' data.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.