feat(account): #49 include tests
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 4m30s

This commit is contained in:
2025-05-09 17:09:03 +02:00
parent 5cfea4e2d3
commit d44a717e5f
3 changed files with 233 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ func CrossSiteRequestForgery(auth service.Auth) func(http.Handler) http.Handler
csrfToken = r.Header.Get("csrf-token")
}
if session == nil || csrfToken == "" || !auth.IsCsrfTokenValid(csrfToken, session.Id) {
log.Info("CSRF-Token not correct")
log.Info("CSRF-Token \"%s\" not correct", csrfToken)
if r.Header.Get("HX-Request") == "true" {
utils.TriggerToastWithStatus(w, r, "error", "CSRF-Token not correct", http.StatusBadRequest)
} else {