opencode-bot: changes for issue #191 #200
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente!200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "opencode/issue-191"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #191.
🤖 Reviewing this PR — the review will link the full session transcript.
✅ Verdict: approve — no blocking issues found.
Good to merge. The server-side cookie write is sound:
LastPage.Rememberstill gates both directions (and thelaunchroot inNotPlaceskeeps/launch/rememberfrom ever being remembered itself),ShareLink.TryParsewith a null origin only accepts rooted relative paths so the launch-time board check can't be pointed off-site, and the unauthenticated pass-through preserves the sign-in-with-destination flow. The WebKit 7-day cap ondocument.cookieis real, and the cookie encoding round-trips consistently between the server write, the reader, and the e2e test's hand-set cookie. One comment inaccuracy worth fixing (below): the antiforgery middleware does not actually 400 this endpoint, so theSec-Fetch-Siteheader check is the only gate, not a second one behind antiforgery. That doesn't block merge — the check does the work, and the cookie is harmless — but the comment claims a protection that isn't there, in three places (Program.cs, LastPage.cs, docs/ui.md).⏱ 2m 31s · 7 steps · $0.0139 · tokens: 61.5k in / 5.5k out (+65.0k cache-read) · Go: 5h 27% · wk 35% · mo 20%
📜 Full session transcript
@ -370,0 +403,4 @@// rides along on), and the same month.//// Same-origin only. The cookie is harmless, but nothing off-site has a reason// to set it, and this is a POST — the one header is the whole of the CSRFThis comment is factually wrong: the antiforgery middleware does not 400 a cross-site POST here.
UseAntiforgeryonly validates endpoints carryingIAntiforgeryMetadatawithRequiresValidation=true, which minimal APIs add automatically only to form-binding endpoints — a JSON-body endpoint like this one has no such metadata, and even for metadata-carrying endpoints the middleware records a verdict rather than short-circuiting. So theSec-Fetch-Sitecheck is the only gate, not "the second gate". The check itself is adequate (the cookie is harmless and a forged write buys an attacker nothing), but the comment should say the header check is the whole of the CSRF story, as the earlier paragraph already does. The same wrong claim appears inLastPage.cs's docs and indocs/ui.md.🔧 Let opencode-bot fix this — tick the box and opencode-bot picks up the review above, on this PR branch. Nothing runs until you do.