Skip to content

Commit

Permalink
Merge ed5be99 into 37cb4ce
Browse files Browse the repository at this point in the history
  • Loading branch information
splaunov committed May 27, 2022
2 parents 37cb4ce + ed5be99 commit 4b2e69a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfservice/flow/verification/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func (h *Handler) fetch(w http.ResponseWriter, r *http.Request, _ httprouter.Par
// Browser flows must include the CSRF token
//
// Resolves: https://github.com/ory/kratos/issues/1282
if req.Type == flow.TypeBrowser && !nosurf.VerifyToken(h.d.GenerateCSRFToken(r), req.CSRFToken) {
if req.Type == flow.TypeBrowser && req.CSRFToken != "" && !nosurf.VerifyToken(h.d.GenerateCSRFToken(r), req.CSRFToken) {
h.d.Writer().WriteError(w, r, x.CSRFErrorReason(r, h.d))
return
}
Expand Down

0 comments on commit 4b2e69a

Please sign in to comment.