From a9b2af3e18215afc1f2ea9a1386a6fe4b0245ffc Mon Sep 17 00:00:00 2001 From: Seednode Date: Tue, 8 Nov 2022 19:30:08 -0600 Subject: [PATCH] Fixed improper handling of potentially empty string for strconv.Atoi() --- cmd/version.go | 2 +- cmd/web.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/version.go b/cmd/version.go index 4bdb202..651270b 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.23.0" +var Version = "0.23.1" func init() { rootCmd.AddCommand(versionCmd) diff --git a/cmd/web.go b/cmd/web.go index 539019f..97f5eff 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -192,6 +192,9 @@ func serveHtml(w http.ResponseWriter, r *http.Request, filePath, dimensions stri w.Header().Add("Content-Type", "text/html") refreshInterval := r.URL.Query().Get("refresh") + if refreshInterval == "" { + refreshInterval = "0" + } queryParams, err := generateQueryParams(filters, r.URL.Query().Get("sort"), refreshInterval)