The free plan's record limit can be bypassed by restoring deleted records
- What I found
- Creating a record at the 50-record limit is blocked. Restoring a deleted record at the same limit isn't checked, so the account can go past the cap.
- How to reproduce
-
- Bring a free account to 50 records, with a few deleted records in the recycle bin.
- Try to create a 51st record. It's blocked, as expected.
- Restore the deleted records from the recycle bin. They're all restored, and the account goes past 50 (to 58 in my test).
- Why it matters
- The limit is what separates the free plan from the paid one. Any path into the data that skips the check gives away the paid tier's capacity, and the next path someone adds (an import, an API, a merge) will likely skip it too.
- What to change
- Enforce the limit in the one place every write goes through, not in the create handler, so create, restore, import, and anything added later all hit the same check. Then add a test for each path.