Skip to content

Reject ambiguous HTTP authorities and request targets - #16

Merged
EauDoon merged 2 commits into
mainfrom
fix/reject-ambiguous-host-headers
Aug 30, 2026
Merged

Reject ambiguous HTTP authorities and request targets#16
EauDoon merged 2 commits into
mainfrom
fix/reject-ambiguous-host-headers

Conversation

@EauDoon

@EauDoon EauDoon commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Require exactly one Host header containing only the active loopback authority.
  • Reject user information, paths, queries, and fragments in Host values.
  • Require origin-form request targets before rate accounting or routing.
  • Cover duplicate Host values and foreign absolute-form GET and POST targets with raw-socket regressions.
  • Prove rejected targets cannot mutate action state or consume the rate budget.

Tests

  • npm run check (137 tests)
  • Focused HTTP authority regressions (2 tests)
  • Public-tree scanner: no finding delta

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread src/http-server.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟨 Empty Host delimiters bypass validation

hostUrl accepts empty user-info, query, and fragment delimiters because URL normalization erases them. Ambiguous Host values can reach every route.

(Refers to this code)

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@EauDoon
EauDoon merged commit 9a34ed9 into main Aug 30, 2026
7 checks passed
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.

1 participant