Remove cans feature; harden pw_/tok_ cookie flags (pre-release fixes) (#307)
CI / test (push) Successful in 21s
CI / docker (push) Successful in 42s

This commit was merged in pull request #307.
This commit is contained in:
fen committed 2026-10-16 21:59:34 +00:00
1 parent 651bc0cb86
commit c02550050f
20 files changed
+176 -1367

No files matched your search

+5 -2
View File
@@ -1,7 +1,7 @@
package api
// #143: create responses must set the short-lived tok_<id> HttpOnly cookie
// that the paste view reads for the one-time created banner.
// #143: create responses must set the short-lived tok_<id> HttpOnly+Secure
// cookie that the paste view reads for the one-time created banner.
import (
"net/http"
@@ -29,6 +29,9 @@ func TestCreateSetsDeletionTokenCookie(t *testing.T) {
if !c.HttpOnly {
t.Error("tok_ cookie not HttpOnly")
}
if !c.Secure {
t.Error("tok_ cookie not Secure")
}
if c.MaxAge != 60 {
t.Errorf("tok_ cookie MaxAge = %d, want 60", c.MaxAge)
}