all repos — searchix @ 442345898802e93b0b884fd0f1c3492e08c34049

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix: extra data after error parsing query string
Alan Pearce alan@alanpearce.eu
Fri, 12 Jul 2024 19:39:56 +0200
commit

442345898802e93b0b884fd0f1c3492e08c34049

parent

5a2d54d9c8751935284293b2ffd396fff0a5d202

1 files changed, 2 insertions(+), 0 deletions(-)

jump to
M internal/server/mux.gointernal/server/mux.go
@@ -107,6 +107,8 @@ if pg != "" { 					page, err = strconv.ParseUint(pg, 10, 64)
 					if err != nil || page == 0 {
 						errorHandler(w, r, "Bad query string", http.StatusBadRequest)
+
+						return
 					}
 				}
 				results, err := index.Search(ctx, source, qs, (page-1)*search.ResultsPerPage)