Skip to content

Commit 4055af0

Browse files
committed
csrf: Set state correctly.
1 parent f84aaf6 commit 4055af0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

users/csrf/csrf.go

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type csrfPayload struct {
2020
// newSessionCookie creates a new encrypted cookie for the given UserSession
2121
func (m *Module) New(state string) (string, error) {
2222
b, err := json.Marshal(&csrfPayload{
23+
State: state,
2324
Token: token.New32(),
2425
ExpireAfter: time.Now().Add(m.csrfValidityDuration),
2526
})

0 commit comments

Comments
 (0)