Read the expiry form value where the body is bounded (#43)
All checks were successful
check / check (push) Successful in 2m36s

The pinned CI linter's gosec G120 flagged r.FormValue in
buildDatabaseTargetConfig because the MaxBytesReader guard lives
one function up in processTargetCreate, out of static-analysis
sight. Read the expiry alongside the other form values in
processTargetCreate and pass it down as a string, matching how
the http and slack config builders receive their URL.
This commit is contained in:
2026-08-07 16:59:26 +00:00
parent d35ad0c49e
commit 7ca62664d0
3 changed files with 19 additions and 45 deletions

View File

@@ -28,7 +28,7 @@ func (s *Handlers) BuildSlackTargetConfigForTest(
// package.
func (s *Handlers) BuildDatabaseTargetConfigForTest(
w http.ResponseWriter,
r *http.Request,
expiry string,
) (string, error) {
return s.buildDatabaseTargetConfig(w, r)
return s.buildDatabaseTargetConfig(w, expiry)
}