Surfaced by QA run #10663 (attachments-storage.field-accept-maxsize-server-enforced) at 79ebb37. Existence + mechanism only; full reproduction withheld pending maintainer review per the auth/authz disclosure carve-out — available in the QA session on request. This one is a HYPOTHESIS for the non-admin case — only the admin path was proven.
What
The server-side accept/maxSize re-check on record write reads sys_file.mime_type and sys_file.size, and those columns are writable through the ordinary data API (PATCH /api/v1/data/sys_file/<id>). A caller who can PATCH a sys_file row can null those fields; the accept/maxSize check then has nothing to test against and passes (the documented "missing metadata is not a violation" boundary), reachable on demand.
What is proven vs. open
- Proven (as the seeded platform admin): nulling
mime_type/size on a sys_file row succeeds and lets a subsequent write bypass the field's accept/maxSize constraint. As admin this is expected privilege, not a hole. - Open / needs a run: whether a non-admin file owner (or any caller who can reference the row) can PATCH those columns. If yes, the field-level accept/maxSize control is bypassable by an unprivileged caller — an authz-adjacent defect. If RLS/FLS blocks the non-admin PATCH, this is a non-issue.
Mechanism (fix-oriented)
sys_file.mime_type/size are not treated as system-managed/immutable after commit, so the metadata the constraint check trusts is caller-mutable. Fix direction (if the non-admin case confirms): make those columns immutable post-commit, or re-derive them server-side rather than trusting the stored value at check time. Note the broader boundary: enforcement is declaration-based, not content-based (no magic-byte sniffing anywhere on the upload path) — tracked separately.
Next step
A follow-up run as a non-admin file-owner persona resolves the open half. I can run it if you want the answer before deciding.
QA-source: #10663 · attachments-storage.field-accept-maxsize-server-enforced · knownGap (content-boundary / metadata-mutability)
Surfaced by QA run #10663 (
attachments-storage.field-accept-maxsize-server-enforced) at79ebb37. Existence + mechanism only; full reproduction withheld pending maintainer review per the auth/authz disclosure carve-out — available in the QA session on request. This one is a HYPOTHESIS for the non-admin case — only the admin path was proven.What
The server-side
accept/maxSizere-check on record write readssys_file.mime_typeandsys_file.size, and those columns are writable through the ordinary data API (PATCH /api/v1/data/sys_file/<id>). A caller who can PATCH asys_filerow can null those fields; the accept/maxSize check then has nothing to test against and passes (the documented "missing metadata is not a violation" boundary), reachable on demand.What is proven vs. open
mime_type/sizeon asys_filerow succeeds and lets a subsequent write bypass the field's accept/maxSize constraint. As admin this is expected privilege, not a hole.Mechanism (fix-oriented)
sys_file.mime_type/sizeare not treated as system-managed/immutable after commit, so the metadata the constraint check trusts is caller-mutable. Fix direction (if the non-admin case confirms): make those columns immutable post-commit, or re-derive them server-side rather than trusting the stored value at check time. Note the broader boundary: enforcement is declaration-based, not content-based (no magic-byte sniffing anywhere on the upload path) — tracked separately.Next step
A follow-up run as a non-admin file-owner persona resolves the open half. I can run it if you want the answer before deciding.
QA-source: #10663 · attachments-storage.field-accept-maxsize-server-enforced · knownGap (content-boundary / metadata-mutability)