Public: anyone can read this; the crew can change it.
A private app's page and its preview answer a signed-out visitor with the same 404, never a hint it exists #13695
Merged 18d 11h ago, live in production
A signed-out visitor can no longer tell a private app or preview from a name nobody holds. Before this, two answers gave it away: Opening the app's host in a browser (production, preview, any file path, or /forge/signin): a private app sent you to /apps/open to sign in with a 303, but a missing name gave a bare 404.
-
Reviews
ApprovedClean. A missing app-shaped host now answers a signed-out visitor as a private one does (303 to sign-in for a navigating GET, bare 404 otherwise), and /apps/open asks a signed-out visitor to sign in before it looks the host up. The security floor stays on every response. The sign-in return path goes through safePath, so there is no open redirect. The test compares private and missing across 13 places and 3 Accept headers, and checks the owner still gets in. Nit, not blocking: one createUser call in the test is formatted off-style. No src/web markup changed, so the design principles are not engaged.
-
Checks
shipped production is serving it deploy 68f0754
-
History
- The unknown app's answer is floored where the door returns it, as the door's floor test reads fdaeb31
- Name no door for the /apps/open ordering change 2bc9a9e
- Name no look for the /apps/open ordering change 20cdadb
- Try: signed out, open ledger.<apps domain> and nobody.<apps domain> with a browser; both send you to sign in, and with curl both answer the same 404 22538ef
- A private app answers a signed-out visitor exactly as a missing one (#13678) 0759b49
- The daily count: one line a day in the check log of how many pulls had their pages inferred, named by the builder, or left without (#13362 ask 4) (#13433) 62c2159
- A forge link says when it expires on opening, and an expired link offers one way to ask for a fresh one (#13564) 902f319
- The OAuth consent page names the client and lists each scope in plain words (#13614) d3d4ab2
- A Talk answer can be stopped with one tap, and the answer says stopped and what it cost so far (#13549) 4200679
- An .ics calendar file opens as its events in the browser (#13615) c555d6d
- A bet that would overrun the wallet is refused before it starts, naming the estimate and the balance (#13623) 20daa9d
- /api/v1/explore rows carry the numbers the page's why-line shows: forks, ships, likes and age (#13613) deb7ce3
- The changelog groups entries under a month heading, newest first, with the month in the page's anchor (#13559) 34b36ab
- A template's page lists the files its forge starts with, from its repository, read-only (#13432) 8b95b87
- A sign-in or consent redirect target that points off this origin is ignored (#13607) 8e06626
- A talk answer's cited issue and pull numbers link to their pages, and only to pages the viewer may read (#13438) 6199991
- A bet's card shows its estimate and the wallet balance side by side before it starts (#13422) 08e2894
- Full suite red: 3 files in check run 01m7gawk2nkg0670wwre9nzdy4 (#13628) 4db0649
- A tell's page says what became of it: queued, picked up by whom, and the pull it produced (#13471) 3cfb22a
- An .opml or RSS/Atom file opens as its list of titles and links, with links shown as text (#13410) 1f6fe82
3 earlier comments
A signed-out visitor can no longer tell a private app or preview from a name nobody holds. Before this, two answers gave it away:
- Opening the app's host in a browser (production, preview, any file path, or
/__forge/signin): a private app sent you to/apps/opento sign in with a303, but a missing name gave a bare404. /apps/open?host=…: a real host sent a signed-out visitor to sign in, but a missing one gave the forge's 404 page.
Everything else already matched: the forge's repository pages, the API, /__forge/, and requests that aren't from a browser.
The fix makes a missing name answer the way a private app does, so the sign-in hand-off still works for the owner arriving by link:
src/apps/proxy.ts: the "is this a person navigating" check and the redirect to sign in are pulled out intonavigatingandtoSignIn. A newunknownAppuses them to answer an app-shaped host that names no app.src/http/server.ts: sends those hosts tounknownAppinstead of returning a flat404.src/web/pages/apps.ts:/apps/opennow asks a signed-out visitor to sign in before it looks the host up. A signed-in owner still gets a404for a missing name, and a stranger still gets a404for a private one.
The new test/private-404.test.ts asks a private app and a missing one, signed out, for 13 places (forge page, app page, file, API, production host, preview host, files on them, /__forge/, sign-in, hand-off) under three Accept headers. It compares status, content type, redirect target and the rough body size. It also checks that the signed-in owner still reaches the page, the API and the hand-off grant. Without the fix, 13 of its 40 checks fail.
Not changed: the answer to a caller presenting a token (the token hint) still differs, but that isn't a signed-out visitor. src/http/refusal.ts didn't need touching. A missing name that looks like a hosted child's host still answers its own 404.
bun x tsc --noEmit, scripts/gate.ts --fix and design-lint are clean, and 1,057 tests across the related app and proxy suites pass. One test in test/looks.test.ts ("a real capture through the grant door") fails here with or without this change, because the sandbox blocks Chromium from reaching forge.test.
To try it: signed out, open ledger.<apps domain> and nobody.<apps domain> in a browser and both send you to sign in. With curl, both answer the same 9-byte 404.
🤖 Generated with Claude Code
<!-- look-pages 22538efe28ea --> Look pages for 22538ef, from the gate:
look pages (inferred): this pull changes src/web/pages/apps.ts; the forge pictures / (src/web/pages/apps.ts), /docs (src/web/pages/apps.ts), /explore (src/web/pages/apps.ts) and 22 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
A private app or preview, and a name nobody holds, now give a signed-out visitor exactly the same answer. In a browser, both send you to sign in. With curl, both get the same 404, so nothing hints that a private app exists.
src/apps/proxy.ts: a host shaped like an app's but which nobody holds now goes through the same sign-in step a private app does. Before this, a private host went to sign-in while a missing one got a bare 404, which gave the private one away.src/web/pages/apps.ts:/apps/opensends a signed-out visitor to sign in before it looks the host up. Before, it only asked for sign-in when the host was real.test/private-404.test.ts: checks that private and missing names give the same answer on every page, API path, preview host, file path and sign-in step.
Following review, I added two empty commits: one with a No look: line (the pull changes no rendered page) and one with a No door: line (/apps/open shows nothing new for the terminal to mirror). bun scripts/gate.ts passes after the second; I ran no tests, since neither commit changes any code.
Try it: signed out, open ledger.<apps domain> and nobody.<apps domain> in a browser and both send you to sign in; fetch both with curl and they return the same 404.
🤖 Generated with Claude Code
A private app or preview, and a name nobody holds, now give a signed-out visitor exactly the same answer. In a browser, both send you to sign in. With curl, both get the same 404, so nothing hints that a private app exists.
src/apps/proxy.ts:unknownAppis new. A host shaped like an app's but which nobody holds now gets the same sign-in step and 404 a private app gets. Before, a private host went to sign-in while a missing one got a bare 404, which gave the private one away.src/http/server.ts: the public door returnssecurityFloor(unknownApp(...)). The explicit wrap is whattest/security-floor-doors.test.tschecks for: every return of the public door must visibly apply the security floor. The bare return broke that check, and wrapping it again is harmless becausesecurityFlooronly adds headers that aren't already set.src/web/pages/apps.ts:/apps/opensends a signed-out visitor to sign in before it looks the host up. Before, it only asked for sign-in when the host was real.test/private-404.test.ts: checks that private and missing names give the same answer on every page, API path, preview host, file path and sign-in step.- Empty commits: two carry the
No look:andNo door:lines review asked for. The/apps/openchange alters no rendered page and has nothing for the terminal to mirror.
The other red test, "the archive answers only what a reader may read" in test/contribute-no-forge.test.ts, is about repository archives, which this pull doesn't touch. I didn't find why it failed on the forge; it passed all four times I ran it here. I left it unchanged.
Run before pushing, all green: test/security-floor-doors.test.ts, test/contribute-no-forge.test.ts, test/private-404.test.ts, bun scripts/gate.ts --fix and bun x tsc --noEmit.
Try it: signed out, open ledger.<apps domain> and nobody.<apps domain> in a browser and both send you to sign in; fetch both with curl and they return the same 404.
🤖 Generated with Claude Code
A signed-out visitor can no longer tell a private app or preview from a name nobody holds. Before this, two answers gave it away:
/__forge/signin): a private app sent you to/apps/opento sign in with a303, but a missing name gave a bare404./apps/open?host=…: a real host sent a signed-out visitor to sign in, but a missing one gave the forge's 404 page.Everything else already matched: the forge's repository pages, the API,
/__forge/, and requests that aren't from a browser.The fix makes a missing name answer the way a private app does, so the sign-in hand-off still works for the owner arriving by link:
src/apps/proxy.ts: the "is this a person navigating" check and the redirect to sign in are pulled out intonavigatingandtoSignIn. A newunknownAppuses them to answer an app-shaped host that names no app.src/http/server.ts: sends those hosts tounknownAppinstead of returning a flat404.src/web/pages/apps.ts:/apps/opennow asks a signed-out visitor to sign in before it looks the host up. A signed-in owner still gets a404for a missing name, and a stranger still gets a404for a private one.The new
test/private-404.test.tsasks a private app and a missing one, signed out, for 13 places (forge page, app page, file, API, production host, preview host, files on them,/__forge/, sign-in, hand-off) under threeAcceptheaders. It compares status, content type, redirect target and the rough body size. It also checks that the signed-in owner still reaches the page, the API and the hand-off grant. Without the fix, 13 of its 40 checks fail.Not changed: the answer to a caller presenting a token (the token hint) still differs, but that isn't a signed-out visitor.
src/http/refusal.tsdidn't need touching. A missing name that looks like a hosted child's host still answers its own404.bun x tsc --noEmit,scripts/gate.ts --fixanddesign-lintare clean, and 1,057 tests across the related app and proxy suites pass. One test intest/looks.test.ts("a real capture through the grant door") fails here with or without this change, because the sandbox blocks Chromium from reachingforge.test.To try it: signed out, open
ledger.<apps domain>andnobody.<apps domain>in a browser and both send you to sign in. Withcurl, both answer the same 9-byte404.🤖 Generated with Claude Code
Closes #13678