Skip to content
Snippets Groups Projects

netdoc: Reject BOMs and NULs.

Merged Nick Mathewson requested to merge nickm/arti:tighten-utf-8 into main

Per https://spec.torproject.org/dir-spec/netdoc.html, our netdocs never have a BOM, and never have internal NULs. This MR makes Arti reject such documents.

For arguments on why it's okay to increase parser strictness, see the (forthcoming) proposal 356 at torspec!342 (merged), and see older discussion at torspec#296 (closed).

Closes #1739 (closed).

The reviewer should double-check that I got the BOM (which I think is FEFF) and its byte-swapped sibling (I think it's FFEF) correct: I am prone to move the E around when I am not super-careful.

Merge request reports

Pipeline #258924 passed

Pipeline passed for e36b7e84 on nickm:tighten-utf-8

Merged by David GouletDavid Goulet 1 month ago (Mar 18, 2025 1:39pm UTC)

Loading

Pipeline #259273 failed

Pipeline failed for 197adf43 on main

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading