chore(webui): improve the randomness of session cookies
All checks were successful
main / main (push) Successful in 1m40s
main / deploy (push) Has been skipped
main / publish (push) Has been skipped

Closes #24
This commit is contained in:
Julien Dessaux 2025-04-23 00:16:36 +02:00
parent 342e1d6328
commit 929657fd34
Signed by: adyxax
GPG key ID: F92E51B86E07177E
2 changed files with 7 additions and 8 deletions

View file

@ -21,7 +21,7 @@ func sessionsMiddleware(db *database.DB) func(http.Handler) http.Handler {
return
}
if err == nil {
if len(cookie.Value) != 36 {
if len(cookie.Value) != 43 {
unsetSesssionCookie(w)
} else {
session, err := db.LoadSessionById(cookie.Value)