Create ValidateSession() to not have unwanted side effects when validating session

This commit is contained in:
2025-01-19 20:10:51 +01:00
parent 7b04149a28
commit f99358729c
2 changed files with 22 additions and 14 deletions

View File

@ -10,7 +10,7 @@ import (
func ServeImage(c *b.Config, s map[string]*f.Session) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if _, err := f.ManageSession(w, r, c, s); err != nil {
if _, err := f.ValidateSession(w, r, c, s); err != nil {
if !tokenIsVerified(w, r, c) {
return
}