Skip to content

fix(parser): correct label-too-long error position#101

Merged
tigerwill90 merged 2 commits into
masterfrom
fix/parser-error-positions
May 3, 2026
Merged

fix(parser): correct label-too-long error position#101
tigerwill90 merged 2 commits into
masterfrom
fix/parser-error-positions

Conversation

@tigerwill90
Copy link
Copy Markdown
Collaborator

  1. parseHostname's "label exceeds 63 characters" error reported the wrong start offset when the offending label contained a parameter, because the position was reconstructed from i - partLen while parseBrace advances i without touching partLen
  2. parseBrace also silently accepted ASCII control bytes and DEL inside parameter names, which is now rejected to match the existing check on path bodies.

@tigerwill90 tigerwill90 requested a review from pawndev May 2, 2026 14:14
@tigerwill90 tigerwill90 self-assigned this May 2, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

pawndev
pawndev previously approved these changes May 3, 2026
Comment thread parser.go Outdated
@tigerwill90 tigerwill90 merged commit ba56b3c into master May 3, 2026
4 checks passed
@tigerwill90 tigerwill90 deleted the fix/parser-error-positions branch May 3, 2026 10:50
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