fix(server): bind the dashboard to loopback instead of every interface - #2
Open
sergiobuilds wants to merge 1 commit into
Open
fix(server): bind the dashboard to loopback instead of every interface#2sergiobuilds wants to merge 1 commit into
sergiobuilds wants to merge 1 commit into
Conversation
- the server exported only `port`, so Bun bound it to 0.0.0.0 and served persona.md, nuance.md, and accounts.md to anyone who could route to the host, with no authentication, while the startup line claimed `http://localhost`; it now binds `127.0.0.1` by default, prints the address it actually bound, and warns when `HOST` opts into a wider bind
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
server/index.tsexports{ port, fetch }with nohostname, so Bun binds0.0.0.0. The startup line sayshttp://localhost, which is the part that hides it.Persona files are the most sensitive thing this project produces —
persona.mdcarries the interview log,nuance.mdthe contradictions between self-layers. There is no auth, no session, no CORS restriction in front of them.Measured
Started with
PORT=38217 bun run server/index.tson a Linux host:Anyone who can route to the host reads the interview log. On a tailnet that is every device on the account.
After
ss -tlnpLISTEN 127.0.0.1:38218000)127.0.0.1requestlistening on http://127.0.0.1:38218HOST=0.0.0.0Default is
127.0.0.1;HOSTopts back out for anyone who deliberately wants a LAN dashboard. The log now prints the address it actually bound, so it can no longer claim localhost while serving the network.