[Minor] Filing length checks are measured before cleaning, so a report can be filed with an empty title and empty body
Report
Summary
Filing length checks are measured BEFORE cleaning, so a report can be filed with an empty title and an empty body: a title of 8 control characters and a body of 40 control characters pass the 8/40 minima, but both are stored empty.
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= 8 BEL characters (\x07x 8)body= 40 BEL characters (\x07x 40)area=sdk-docs-webclaimed_tier=minorprivate=false
- Observe the response: HTTP 200 and a new ticket id is returned (my probe created XE-12991).
- As an anonymous user,
GET https://bounty.xe.network/v1/tickets/XE-12991and observe the stored ticket has"title": ""and"body": "". - The same defeat works with mixed input: a title of "ab" + 6 control characters passes the 8-character check but is stored as 2 characters.
Note: XE-12991 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 ~22:04 WIB)
POST /v1/reporter/ticketswith title 8x\x07, body 40x\x07-> HTTP 200, ticket XE-12991, visibility public.- Anonymous
GET /v1/tickets/XE-12991-> stored"title": "","body": "". - The multipart filing route has no boundary check for these bytes: the JSON
auth.Bodycheck (NUL -> 422) does not apply toForm(...)parameters, and no "NoNul" middleware exists anywhere in the repo (grep: zero hits).
Root cause
In desk/services/reporters.py:451-462 (origin/main), file_ticket strips whitespace and then length-checks the title (8..200) and body (40..60000) on the RAW value. tsvc.create() (desk/services/tickets.py:231-253) then stores clean_text(title, one_line=True)[:512] and set_body(clean_text(body)), where clean_text (tickets.py:87-98) strips NUL and control characters via _CONTROL = re.compile(r"[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]") (plus lone surrogates). \x07 is inside \x00-\x08, so it is stripped after the length gate has already passed. The stated minima are therefore measured on input that is then thrown away — the stored ticket violates the rule the check claims to enforce.
Impact
Low. No data leak and no privilege issue. The cost is queue pollution: empty-title / empty-body tickets land in the public list and the triage queue, and the length rules the desk advertises ("give the report a title of at least eight characters", "say more ... 40 characters at least") can be defeated entirely. Same silent-mishandling class as XE-3116 / XE-3342 / XE-12962, different field and different mechanism.
Suggested severity
Minor (validation gap at the desk's edge; the Minor tier covers misleading behaviour).
Fix suggestion
Measure the length AFTER clean_text in file_ticket: clean first, then check 8/40 on the cleaned value. One-line rule fix, same pattern as XE-12962's "validate the stored value, not the raw input".
Duplicate check
Searched the desk before filing (2026-11-14): XE-11963 (clean_text lets bidi/invisible chars THROUGH — the opposite direction), XE-8558 (control bytes in a wallet memo, SDK surface), XE-10097 (reply_draft has NO length cap at all), XE-9659 / XE-9597 / XE-3534 (hex whitespace spellings). None covers length being checked before cleaning on filing intake. No existing ticket covers filing an empty title/body this way.
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.