You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
viewer: malformed Host header throws before the guard — Bun dev error page discloses stack/paths #12
In startViewer().fetch (src/viewer/server.ts), const url = new URL(req.url) runs beforerejectRequest (introduced in #10). A request with a malformed Host header (e.g. Host: 127.0.0.1.8789 with no port separator) makes Bun throw while constructing req.url, before any of our handlers run — and Bun answers with its default development error page: ~50 KB of HTML containing the stack trace and local file paths.
This is fail-closed (no store data is returned) and pre-existing, but it is stack/path disclosure on a port that any local process can touch, and #10 is the natural place to close it.
Fix
Parse the URL defensively and fail closed with 4xx instead of throwing:
Activity
chore(release): 0.3.3 [skip ci]
abogartz-opencode-self-improvement commentedon Oct 21, 2026
🎉 This issue has been resolved in version 0.3.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
fix(viewer): parse the Host-derived URL inside a guard; add nosniff +…
Merge pull request abogartz#27 from abogartz/fix/viewer-guard-order
fix(viewer): answer a malformed Host with 400 instead of Bun's error …
chore(release): 0.3.6 [skip ci]
abogartz-opencode-self-improvement commentedon Oct 21, 2026
🎉 This issue has been resolved in version 0.3.6 🎉
The release is available on:
Your semantic-release bot 📦🚀