Refactor CSRF protector (#32057) (#32069)

#32057 improves the CSRF handling and is worth to backport
This commit is contained in:
wxiaoguang
2024-09-18 17:02:45 +00:00
committed by GitHub
parent 8dbe83d205
commit 2891edbbcb
7 changed files with 71 additions and 172 deletions
+2
View File
@@ -129,6 +129,8 @@ func webAuth(authMethod auth_service.Method) func(*context.Context) {
// ensure the session uid is deleted
_ = ctx.Session.Delete("uid")
}
ctx.Csrf.PrepareForSessionUser(ctx)
}
}