ParseSource mapped any unrecognised string to BlockSource.Operator. Measured on
the shipped image (openwaf:ci), with two operator blocks and three engine bans
live:
GET /admin-api/blocks?source=enigne -> 200, the operator list, engine bans hidden
DELETE /admin-api/blocks?source=enigne -> 200 {"deleted":1}, then operator=0 engine=3
The caller who mistyped "engine" while clearing automatic bans erased the
operator's hand-maintained list instead — the exact failure the comment above
that endpoint says the provenance parameter exists to prevent. A missing source
was already refused with 400; a misspelled one was not.
After the fix, same image, same script:
GET ?source=enigne -> 400 source must be operator|engine|all; got "enigne"
DELETE ?source=enigne -> 400, counts unchanged (operator=2 engine=3)
DELETE ?source=engine -> 200 {"deleted":3}, then operator=2 engine=0
Two more of the same family, both measured on the image:
expiresInMinutes: 0 and -5 -> 204 with expiresAt: null. Not "no expiry given",
but a permanent allow entry — the one control that outranks every ban — from
a field left at zero. Absent is now the only way to say never; present must
be 1..5256000 or it is a 400. The console page refuses 0 in the field before
the round trip, and the gate asserts both halves: 0 is refused, empty still
means never.
a 1 MB reason and a 1 MB note -> 204, and the listings then returned
~1,000,287 and ~1,000,722 bytes for a handful of rows. Operator notes are
bounded at 512 characters, the budget the attacker-written path field
already gets, so the two columns in the same table are the same size.
unit 126/126 (unchanged), integration 62 -> 73 (+11), console 37 -> 39
Teeth, each measured by putting the old line back: old ParseSource -> exactly 5
integration tests fail; expiry guard off -> exactly 3; length guards off ->
exactly 1.