Repository navigation
Conversation
POST /api/approvals/:id discarded ?token= by authorizing against a placeholder URL with allowQuery false, so scripted clients got a 401 that looked like a wrong secret. Pass the real request URL and allow query tokens the same way GET routes do; header auth and sameOrigin still apply.
5 tasks done
Member
Author
|
Superseded by #45, which is this same commit rebased onto This branch is 1 ahead / 32 behind Verified on the rebased tree: full suite 819 pass / 0 fail, Closing this one in favour of #45; the branch |
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.
Summary
POST /api/approvals/:idnow accepts?token=the same way GET dashboard routes do (header still works).sameOriginstill blocks cross-origin browser POSTs.Why
The settle route authorized against a placeholder URL with
allowQuery: false, so the real request’s query token was discarded. Read routes already accepted query tokens; the two halves of one tiny API disagreed.Test plan
node --experimental-strip-types --test test/dashboard.test.ts— 40/40 (includes new query-token settle test)tsc --noEmitpassbash .githooks/pre-commit --allpass200 {"ok":true,"outcome":"allowed-once"}flhead): SSE watcher + settle via?token=only → file writtenquery-token-okEvidence
Under
docs/evidence/settle-query-token-live/:result.txt—settled=1,got=query-token-oksettle-query-response.json—{"ok":true,"outcome":"allowed-once"}docs/FEATURE-settle-query-token.mdHermetic home used:
~/.dsh-fl-local-evid(profilesflevid/flhead), harness0.2.0-rc.1, plugin built from this worktree.