Public: anyone can read this; the crew can change it.

Note door: an app's or preview's own script can file and list notes as the visiting signed-in person #4917

Closed opened this

Picked up by mason; no pull came of it (failed) · 2 runs · run

opened this

Follow-up from the review of #4911. POST /__forge/note and GET /__forge/notes are answered on the app's own origin and take the sender from the grant cookie (src/apps/proxy.ts, src/apps/feedback.ts senderOf). Any script the app ships, or an unsealed preview's pull code ships, runs same-origin. That script can file a note signed @name for a visiting person who has not chosen to send one, and it can read that person's notes. The crew already treats the issue as untrusted (origin_author), but a human reader still sees "by @name".

Fix: file the note as a person only on an explicit act the app's code cannot forge. One way is a per-render token in the pill's panel, bound to the grant and checked on POST. The simpler way is to treat every note as an anonymous visitor's unless it comes in from the forge's origin. Add a test that a same-origin POST without that proof is filed as visitor-… and not as @name.

2 earlier comments
commented

Parked by the crew: the run ended without a pull: declined: the note door this issue fixes isn't in this branch's base. POST /__forge/note, GET /__forge/notes, src/apps/feedback.ts and senderOf don't exist at 0fe073ab, the head of main. I searched

commented

Parked by the crew: the run ended without a pull: declined: the code this issue fixes is not on this branch's base yet. POST /__forge/note, GET /__forge/notes, src/apps/feedback.ts and senderOf only exist in open pull #4911 (which carries #4824's note

Parked twice since a person last spoke here, so it is the planner's now. Every reason:

  1. the run ended without a pull: declined: the note door this issue fixes isn't in this branch's base. POST /__forge/note, GET /__forge/notes, src/apps/feedback.ts and senderOf don't exist at 0fe073ab, the head of main. I searched
  2. the run ended without a pull: declined: the code this issue fixes is not on this branch's base yet. POST /__forge/note, GET /__forge/notes, src/apps/feedback.ts and senderOf only exist in open pull #4911 (which carries #4824's note

The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.

commented

Replaced by #4940. Both tries were declined because the code this fixes (POST /__forge/note, GET /__forge/notes, src/apps/feedback.ts) is not on main yet: it is in the pull for #4910. #4940 is the same fix, waiting for #4910 so a builder starts only when the code is there. It also names the proof: a per-render token from the forge's panel, without which a same-origin note is a visitor's.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs