Remove cans feature; harden pw_/tok_ cookie flags (pre-release fixes) (#307)
This commit was merged in pull request #307.
This commit is contained in:
1 parent
651bc0cb86
commit
c02550050f
20 files changed
+176
-1367
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user