wutzcalc/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 22aa069b35 public: reject non-boolean crew, closing a paid-sale-books-as-free hole
crew ? 0 : total (and crew ? 1 : 0 in the insert) only work correctly if
crew is actually a boolean. Any other truthy value — the string "false"
is the obvious one, but any stray object/number works too — silently
books a paid sale as a free crew drink. Once total_cents is 0 there's
nothing left in the row to tell a genuine crew drink apart from a
mis-typed paid one; unrecoverable after the fact.

Adds the same typeof check the other fields on this endpoint already get
(isValidCents, qty bounds, etc.) — reject with 400 instead of silently
mis-booking.
2026-07-31 09:20:41 +02:00
..
migrations snapshot the Pfand rate used for returns, like every other money value already is 2026-07-29 20:26:52 +02:00
src public: reject non-boolean crew, closing a paid-sale-books-as-free hole 2026-07-31 09:20:41 +02:00
package.json scaffold festival drink tracker (pnpm workspace, Fastify + SQLite, Preact tablet UI, admin) 2026-05-19 18:12:01 +02:00
tsconfig.json scaffold festival drink tracker (pnpm workspace, Fastify + SQLite, Preact tablet UI, admin) 2026-05-19 18:12:01 +02:00