LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Who may see what
  4. · 4 minutes · Pro

One field, a million credits

A free user now has 1,000,000 AI credits and the Pro plan. shows they never paid.

This answers: How do users give themselves a paid plan? No coding needed. 3 quick decisions.

  • Who may see what
  • Payments and webhooks
  • Where your data lives

Checking your access…

How do users give themselves a paid plan?

If users may update their own row and that row also stores plan, credits or role, they can send those fields in a normal request. Keep anything that grants access or money in a table users can only read, change it from the server, and grant paid plans only from a verified payment event.

Trail of the bug
  1. Browser
  2. Database

Breaks at Database: Users can write their own plan column

How it works

What Maya's browser can readRow Level Security
OrderOwnerTotalMaya sees it?
#1042Maya£120Yes, hers
#1043Tom£80Yes: leaked
#1044Ana£215Yes: leaked
#1045Maya£42Yes, hers
With RLS off, any role granted access to the table, such as the public key, can read every row. Maya, or anyone with your site open, gets everyone's orders.

Why AI tools write this bug

AI tools often store plan and credits on the profile row and add a policy letting users update their own row, which unlocks every column at once.

How to fix it

  1. Move plan, credits and roles out of user-editable tables.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Is hiding the field in the form enough?
No. Requests can contain any field, whatever the form shows.

Related scenarios

  • The table anyone can readPro · 5 min
  • Permission denied for tablePro · 4 min
  • The double orderPro · 5 min

More on this trail

Who may see what: Sign-in, permissions, and the leaks AI-built apps ship most often.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

3 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Move plan, credits and roles out of user-editable tables.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock