simpl-liste/web
le king fu 97f5a6bad6 fix(security): whitelist sync data columns and check ownership of references
POST /api/sync copied the client's `data` into `.set()` for list, task
and tag updates, so an authenticated client could rewrite `userId`
(moving its rows into another account), `id`, `createdAt` or
`deletedAt`. Task-tag links, task `listId`/`parentId` and list creation
did not check that the referenced rows belong to the caller.

- web/src/lib/syncData.ts: one zod schema per entity and action. Unknown
  keys are stripped rather than rejected, because the app marks its
  outbox as synced on HTTP 200 and a skipped operation would be lost.
  Strings are truncated to the mobile limits (notes 10000). Null maps
  to undefined for NOT NULL columns.
- processOperation writes only the parsed output; taskTag create and
  delete verify the task and the tag; task create/update verify
  listId; parentId and list create ids are refused when taken by
  another account (a missing parent passes, since initialMerge can push
  a subtask before its parent).
- vitest 4.1 (vitest 5 requires @types/node >= 22, web is on 20) with
  tests built from the payloads the app sends today.
- REVIEW.md: rules and pitfall updated, npm test added, syncData.ts in
  the Haut table (review-levels.py --check passes).

Refs #142

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:11:49 -04:00
..
public feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
src fix(security): whitelist sync data columns and check ownership of references 2026-10-19 22:11:49 -04:00
.env.template fix: rename .env.example to .env.template to avoid false positive (#53) 2026-04-08 15:20:55 -04:00
.gitignore feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
AGENTS.md feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
CLAUDE.md feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
Dockerfile fix: auto-apply migrations on startup + cleanup duplicate inboxes (#60) 2026-04-09 08:53:09 -04:00
drizzle.config.ts feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
eslint.config.mjs feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
next.config.ts feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
package-lock.json fix(security): whitelist sync data columns and check ownership of references 2026-10-19 22:11:49 -04:00
package.json fix(security): whitelist sync data columns and check ownership of references 2026-10-19 22:11:49 -04:00
postcss.config.mjs feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
README.md feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00
server.ts fix: auto-apply migrations on startup + cleanup duplicate inboxes (#60) 2026-04-09 08:53:09 -04:00
tsconfig.json feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35) 2026-04-06 11:03:34 -04:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.