[Minor] Reporter filing silently drops an unknown area instead of rejecting it
Report
Summary
Reporter 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.
Reproduction steps
- Sign in to the desk as a reporter (any reporter account; I used reporter 735) and obtain a session cookie + CSRF token.
- Send an authenticated filing request to
POST https://bounty.xe.network/v1/reporter/tickets(multipart form) with:kind=bountytitle(at least 8 characters, e.g. "Probe: unknown area filing")body(at least 40 characters)area=invalid_xyzclaimed_tier=minorprivate=false
- Observe the response: HTTP 200 and a new ticket id is returned (my probe created XE-12923).
- As an anonymous user,
GET https://bounty.xe.network/v1/tickets/XE-12923and observe the stored ticket hasarea: nullandclaimed_tier: minor. - Contrast with the neighbouring validations on the same endpoint: filing with
claimed_tier=Bogusreturns HTTP 400 (claimed_tier must be one of [...]), and an unknownkind, a too-short title, or a too-short body also return 400. Onlyareais silently dropped. - Contrast with the team path:
POST /v1/team/ticketswith the same unknown area returns HTTP 400. Same input, different verdict depending on which door it enters through.
Note: 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.
Evidence (checked 2026-11-14 ~21:26 WIB)
POST /v1/reporter/ticketswitharea=invalid_xyz,claimed_tier=minor,private=false-> HTTP 200, ticket XE-12923, visibility public.- Anonymous
GET /v1/tickets/XE-12923-> storedarea: null,claimed_tier: minor. - 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-matchinagainst the vocabulary). - 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 capitalisedclaimed_tier="Critical"is born private).
Root cause
In desk/services/reporters.py:464 (origin/main):
area = f.area if f.area in (TOPICS if f.kind == "support" else AREAS) else None
The 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:
if area is not None and area not in vocab: raise HTTPException(400, f"area must be one of {list(vocab)}")
The 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.
Impact
Low. 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.
Suggested severity
Minor (same class as XE-3116 / XE-3342: silent mishandling of an invalid value at the desk's edge).
Fix suggestion
Validate 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.
Duplicate check
Searched 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.
Payout address
c5a40f6553410eb46f500ced80223846202e27acec81ed5e8f28220eb737ecee (the desk key this report was filed with; reporter 735, xe:c5a40f65)
Thread
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.