feat(account): #49 include tests
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 5m53s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 5m16s

This commit was merged in pull request #61.
This commit is contained in:
2025-05-09 17:09:03 +02:00
parent 5cfea4e2d3
commit 0203504f99
3 changed files with 234 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 {