Skip to content

Refuse IPv6 outside 2000::/3 and URLs over 2000 characters - #3

Merged
sharmis-tp merged 2 commits into
cppalliance:masterfrom
sharmis-tp:ipv6-url-policy
Nov 23, 2026
Merged

sharmis-tp merged 2 commits into
cppalliance:masterfrom
sharmis-tp:ipv6-url-policy

Conversation

@sharmis-tp

Copy link
Copy Markdown
Collaborator

Step 2 of the order of work in research/2026-11-19-web-fetch-field-survey.md (G12, G13).

  • address.rs: an IPv6 address outside 2000::/3 is refused even where no table entry names its range, so a special range the table misses fails closed. The check runs after the table and the embedded-IPv4 check, so those keep their range names; the new rule reports outside 2000::/3. 2001::/23 joins the table, the one range of the MCP reference server's ten that the table lacked.
  • url_policy.rs: check_url refuses a URL over MAX_URL_CHARS (2000) characters before parsing, as the new hard FetchError::UrlTooLong: "the URL is {n} characters long, and the limit is 2000". It counts characters, not bytes. Redirect targets go through check_url, so the limit covers them too.

Tests: 2001::/23 added to the boundary matrix (with it, all ten reference ranges are covered); addresses on both sides of the 2000::/3 edges; the reported range name; a 2000-character URL admitted, a 2001-character one refused, and a multi-byte URL counted by characters.

Not in this PR, from the same step: the internationalized host name test, the brotli bomb test, and the two doc updates outside the Pack (decisions/tools-and-packs.md:399, runvil-docs chapter 13). Happy to do those next.

Verified: nextest (148 passed), clippy with warnings denied, rustdoc with warnings denied, fmt, build-checks.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65d85722-69af-4f7d-bbcb-7f3a3c4583ab
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@vinniefalco

Copy link
Copy Markdown
Member

This is approved, once the supply-chain update is applied and Actions turns green.

@sharmis-tp
sharmis-tp merged commit 9685248 into cppalliance:master Nov 23, 2026
10 checks passed
@sharmis-tp
sharmis-tp deleted the ipv6-url-policy branch November 23, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants