vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Keep no-store pages same-origin for Firefox forms
c4e9d9571b41c4d47a6467987fea4f522e6e98d5 · Keenan Nemetz · 8d ago · parent 6c694920
Keep no-store pages same-origin for Firefox forms Firefox sends Origin: null for a form post from a document with Referrer-Policy: no-referrer, even when the page and action are same-origin. sameOriginRequest deliberately refuses the opaque origin, so every form on the account, sign-in, registration, and invitation pages returned 403 before its handler ran. Adding an SSH key from Firefox failed even with a correct CSRF field and a freshly loaded canonical page. noStore now keeps the referrer same-origin. That still sends no referrer to another site, while Firefox sends the real Origin and the existing lock accepts it. The opaque origin remains refused: this fixes the page rather than weakening the check. Also name the two CSRF refusal reasons so a stale form or a foreign origin is not left as a bare bad request. closes: 01M8AN4K0NWPEQ5CKQ934M5FV5
server/web/write_context.go +2−2
| @@ -139,8 +139,8 @@ func (w *Web) readForm(rw http.ResponseWriter, r *http.Request, maxBody int64) b | |||
| 139 | 139 | http.Error(rw, "cannot read the form", http.StatusBadRequest) | |
| 140 | 140 | return false | |
| 141 | 141 | } | |
| 142 | if !w.csrfOK(r) { | ||
| 143 | http.Error(rw, "bad request", http.StatusForbidden) | ||
| 142 | if problem := w.csrfProblem(r); problem != "" { | ||
| 143 | http.Error(rw, problem, http.StatusForbidden) | ||
| 144 | 144 | return false | |
| 145 | 145 | } | |
| 146 | 146 | return true | |