Skip to content

test(fapi): expect FuzzParseEndpointURL to refuse an empty fragment - #783

Merged
osanderson merged 1 commit into
mainfrom
test/fuzz-url-empty-fragment
Nov 2, 2026
Merged

osanderson merged 1 commit into
mainfrom
test/fuzz-url-empty-fragment

Conversation

@osanderson

@osanderson osanderson commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The fuzz run on main found http://loCAlhost# in FuzzParseEndpointURL. The parser is right: since the empty-fragment fix, a URL ending in a bare # is refused. The oracle was stale. It required an otherwise valid loopback http URL to be accepted under AllowLoopbackHTTP whenever url.Parse reported no fragment, and url.Parse drops a bare #.

  • The "not wrongly rejected" check now skips any input containing #.
  • The "accepted URL" check now also fails on any # in the input, so the fuzzer enforces the new rule instead of only tolerating it.
  • The failing input is kept as a seed in testdata/fuzz/FuzzParseEndpointURL/.

Test-only. A 60 s local fuzz run is clean.

Fixes #782.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Since v0.69.0 a URL ending in a bare "#" is refused, but the fuzz
oracle still required an otherwise valid loopback http URL to be
accepted when url.Parse showed no fragment, and url.Parse drops a bare
"#". The nightly run found "http://loCAlhost#". The oracle now treats
any "#" in the input as a fragment, both when it may be refused and
when an accepted URL must have none. The input is kept as a seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@osanderson
osanderson force-pushed the test/fuzz-url-empty-fragment branch from ab9b639 to 79615ac Compare November 2, 2026 08:24
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@osanderson
osanderson merged commit cc689a7 into main Nov 2, 2026
27 checks passed
@osanderson
osanderson deleted the test/fuzz-url-empty-fragment branch November 2, 2026 08:31
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.

Nightly fuzz failure

1 participant