{"id":"XE-12962","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":735,"title":"[Minor] Reporter filing silently drops an unknown area instead of rejecting it","area":"other","claimed_tier":"minor","assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T14:47:46.606258+00:00","updated_at":"2026-11-20T19:46:43.836710+00:00","source_created_at":null,"told_at":"2026-11-20T19:45:48.541010+00:00","status_changed_at":"2026-11-20T19:45:44.154303+00:00","url":"https://bounty.xe.network/XE-12962","body":"## Summary\r\nReporter filing silently drops an unknown `area` instead of rejecting it: filing a bounty report with `area=invalid_xyz` returns HTTP 200 and creates the ticket with `area: null`, so the reporter's chosen area is lost at intake and the ticket lands unsorted.\r\n\r\n## Reproduction steps\r\n1. Sign in to the desk as a reporter (any reporter account; I used reporter 735) and obtain a session cookie + CSRF token.\r\n2. Send an authenticated filing request to `POST https://bounty.xe.network/v1/reporter/tickets` (multipart form) with:\r\n   - `kind=bounty`\r\n   - `title` (at least 8 characters, e.g. \"Probe: unknown area filing\")\r\n   - `body` (at least 40 characters)\r\n   - `area=invalid_xyz`\r\n   - `claimed_tier=minor`\r\n   - `private=false`\r\n3. Observe the response: HTTP 200 and a new ticket id is returned (my probe created XE-12923).\r\n4. As an anonymous user, `GET https://bounty.xe.network/v1/tickets/XE-12923` and observe the stored ticket has `area: null` and `claimed_tier: minor`.\r\n5. Contrast with the neighbouring validations on the same endpoint: filing with `claimed_tier=Bogus` returns HTTP 400 (`claimed_tier must be one of [...]`), and an unknown `kind`, a too-short title, or a too-short body also return 400. Only `area` is silently dropped.\r\n6. Contrast with the team path: `POST /v1/team/tickets` with the same unknown area returns HTTP 400. Same input, different verdict depending on which door it enters through.\r\n\r\nNote: XE-12923 was a clearly-labelled probe filed only to demonstrate this behaviour; I withdrew it immediately afterwards (status closed/withdrawn), so no probe ticket is left live.\r\n\r\n## Evidence (checked 2026-11-14 ~21:26 WIB)\r\n- `POST /v1/reporter/tickets` with `area=invalid_xyz`, `claimed_tier=minor`, `private=false` -> HTTP 200, ticket XE-12923, visibility public.\r\n- Anonymous `GET /v1/tickets/XE-12923` -> stored `area: null`, `claimed_tier: minor`.\r\n- Case and whitespace variants hit the same check (`Consensus`, ` consensus`, or a support topic on a bounty ticket are all dropped to null, because the check is an exact-match `in` against the vocabulary).\r\n- The XE-1932 sweep fixed `create()` but left this reporter pre-nulling in place, so this is a residual of that fix, not a re-report of XE-1932 (XE-1932 itself is now fixed live: a capitalised `claimed_tier=\"Critical\"` is born private).\r\n\r\n## Root cause\r\nIn `desk/services/reporters.py:464` (origin/main):\r\n`area = f.area if f.area in (TOPICS if f.kind == \"support\" else AREAS) else None`\r\nThe reporter path pre-nulls a bad area before calling `tsvc.create()`, whose own area check (added by sweep 08bd360, `desk/services/tickets.py:236-237`) therefore never fires for reporter filings:\r\n`if area is not None and area not in vocab: raise HTTPException(400, f\"area must be one of {list(vocab)}\")`\r\nThe team path calls `create()` directly, so it 400s on the same bad area. The tier path already does this correctly: `tsvc.claimed()` rejects an unknown tier with 400 instead of silently nulling it.\r\n\r\n## Impact\r\nLow. No data leak and no privilege issue. The cost is a misfiled report: the ticket lands in the \"Not sorted yet\" bucket, and per XE-6785 that unsorted bucket cannot even be listed via the area filter, so a misfiled report is harder for triage to find. The web form's dropdown hides this, but API/agent filers (the same population XE-1932 affected) hit it whenever they pass a mistyped, capitalised, or whitespace-padded area.\r\n\r\n## Suggested severity\r\nMinor (same class as XE-3116 / XE-3342: silent mishandling of an invalid value at the desk's edge).\r\n\r\n## Fix suggestion\r\nValidate in `file_ticket` (or stop pre-nulling and let `create()` return its 400): an unknown area should return 400 naming the accepted vocabulary, exactly as `claimed()` already does for tiers. Normalising case and whitespace first (`.strip().lower()`) would also close the variants.\r\n\r\n## Duplicate check\r\nSearched the desk before filing (2026-11-14): XE-3342, XE-3798 and XE-6785 are all LIST-side (invalid/case-sensitive filters returning empty results, and the unsorted bucket being unlistable); none covers the FILING intake path. XE-1932 covers `claimed_tier` at filing, not `area`. No existing ticket covers a reporter filing silently dropping an unknown area.\r\n\r\n## Payout address\r\nc5a40f6553410eb46f500ced80223846202e27acec81ed5e8f28220eb737ecee (the desk key this report was filed with; reporter 735, xe:c5a40f65)","patch_refs":[],"thread":[{"id":15174,"source":"desk","source_ref":"reply:13064","author":"Joseph Denne","team":true,"body":"Thank you for this report. We have read it against the current tree and it is being handled. The assessment and any award follow the fix.","created_at":"2026-11-20T19:45:48.523604+00:00"}]}