challenge: add cookie prefix to cookies tied to host/pubkey to prevent reuse

This commit is contained in:
WeebDataHoarder
2025-04-23 22:37:01 +02:00
parent 49e46e7e9f
commit 3bbd50764a
7 changed files with 28 additions and 18 deletions

View File

@@ -23,7 +23,7 @@ func FillRegistration(state challenge.StateInterface, reg *challenge.Registratio
return challenge.VerifyResultFail
}
utils.SetCookie(utils.CookiePrefix+reg.Name, token, expiry, w, r)
utils.SetCookie(challenge.RequestDataFromContext(r.Context()).CookiePrefix+reg.Name, token, expiry, w, r)
uri, err := challenge.RedirectUrl(r, reg)
if err != nil {