fix: nil ptr deref (#1467)

Signed-off-by: Jason Cameron <jason.cameron@stanwith.me>
Signed-off-by: Jason Cameron <git@jasoncameron.dev>
This commit is contained in:
Jason Cameron
2026-03-18 14:02:57 -04:00
committed by GitHub
parent 3154ff5004
commit c7b31d0ca9
9 changed files with 143 additions and 5 deletions

View File

@@ -33,6 +33,10 @@ func (i *Impl) Issue(w http.ResponseWriter, r *http.Request, lg *slog.Logger, in
}
func (i *Impl) Validate(r *http.Request, lg *slog.Logger, in *chall.ValidateInput) error {
if err := in.Valid(); err != nil {
return chall.NewError("validate", "invalid input", err)
}
rule := in.Rule
challenge := in.Challenge.RandomData