Add missing auth check to saveSetupHandler
Consistent with all other mutation handlers which already guard with ValidateJWTFromCookie. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
07e67d4684
commit
2d6436dca6
1 changed files with 5 additions and 0 deletions
|
|
@ -13,6 +13,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func saveSetupHandler(w http.ResponseWriter, r *http.Request) {
|
func saveSetupHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if !ValidateJWTFromCookie(r, appKey) {
|
||||||
|
http.Error(w, "Unauthorized", http.StatusUnauthorized)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
r.ParseForm()
|
r.ParseForm()
|
||||||
nextSession := r.FormValue("nextSession")
|
nextSession := r.FormValue("nextSession")
|
||||||
incDays := r.FormValue("incDays")
|
incDays := r.FormValue("incDays")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue