Skip to content

Reject incomplete filters - #4235

Merged
josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:legacy-filters-missing-request-fields
Nov 16, 2026
Merged

josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:legacy-filters-missing-request-fields

Conversation

@williamjallen

Copy link
Copy Markdown
Member

Before, if a request gave only some of a filter's field, compare and value parameters, the filter was silently dropped. When it was the only filter, the default match-all filter took its place. On queryTests, which has no row limit by default, a URL like ?filtercount=1&value1=foo returned every test for the day and could run out of memory on large projects. An incomplete filter inside a block returned a 500 instead.

The shared filter parser now returns a 400 that names the missing parameters. A filter with none of its parameters is still ignored, because the filter panels count empty blocks without sending them. New tests in QueryTestsPageFiltersTest cover both cases.

Before, if a request gave only some of a filter's `field`, `compare` and `value` parameters, the filter was silently dropped. When it was the only filter, the default match-all filter took its place. On queryTests, which has no row limit by default, a URL like `?filtercount=1&value1=foo` returned every test for the day and could run out of memory on large projects. An incomplete filter inside a block returned a 500 instead.

The shared filter parser now returns a 400 that names the missing parameters. A filter with none of its parameters is still ignored, because the filter panels count empty blocks without sending them. New tests in `QueryTestsPageFiltersTest` cover both cases.
@josephsnyder
josephsnyder added this pull request to the merge queue Nov 16, 2026
Merged via the queue into Kitware:master with commit 3d8720b Nov 16, 2026
8 checks passed
@williamjallen
williamjallen deleted the legacy-filters-missing-request-fields branch November 16, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants