fix: reject values that exceed Int32 for all SQL LIMIT params

This commit is contained in:
sam committed 2026-09-24 21:45:27 +10:00
1 parent aa8c4206df
commit 55f16fa7d0
5 files changed
+29 -17

No files matched your search

+1 -1
View File
@@ -105,7 +105,7 @@ func TestHandleCapturesDefaultsLimitWhenMissingOrInvalid(t *testing.T) {
seedCapture(t, srv, "src")
}
for _, limit := range []string{"", "not-a-number", "-5", "0"} {
for _, limit := range []string{"", "not-a-number", "-5", "0", "4294967297"} {
req := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/api/captures?limit="+limit, nil)
w := httptest.NewRecorder()
srv.Handler().ServeHTTP(w, req)