Description
The object-list filter request preflight does not accurately follow the executable plan and can both miss invalid filters and reject valid requests.
The preflight should traverse deferred, streamed, live, and nested collection plans while only coercing the nullable ObjectListFilter argument added by the object-list filter middleware.
Source: #612 (review)
Repro steps
-
Execute a query where an object-list filter is inside an @defer, @stream, or @live wrapper, or inside a nested collection element plan.
-
Observe that request-level filter coercion can be bypassed.
-
Execute a query containing an excluded subtree or an unrelated field with an argument such as filter: String.
-
Observe that the preflight can treat that argument as the middleware's object-list filter and reject an otherwise valid request.
Expected behavior
The preflight should:
- traverse
@defer, @stream, and @live wrappers transparently;
- traverse collection element plans and nested filtered fields;
- skip nodes excluded by execution directives;
- coerce only fields whose definition contains the middleware-added nullable
ObjectListFilter argument.
Actual behavior
The traversal stops at wrappers and collection element plans, allowing wrapped or nested list filters to bypass request-level coercion. It also ignores inclusion state and identifies arguments by the name filter, which can incorrectly reject excluded subtrees or unrelated filter arguments.
Known workarounds
Avoid wrapping or nesting object-list-filtered fields and avoid unrelated arguments named filter. These are not practical general-purpose workarounds.
Related information
- Operating system: All
- Branch:
dev / observed while reviewing task-seq-field-streaming-fixes
- .NET Runtime, CoreCLR or Mono Version: .NET 10
- Performance information, links to performance testing scripts: N/A
Description
The object-list filter request preflight does not accurately follow the executable plan and can both miss invalid filters and reject valid requests.
The preflight should traverse deferred, streamed, live, and nested collection plans while only coercing the nullable
ObjectListFilterargument added by the object-list filter middleware.Source: #612 (review)
Repro steps
Execute a query where an object-list filter is inside an
@defer,@stream, or@livewrapper, or inside a nested collection element plan.Observe that request-level filter coercion can be bypassed.
Execute a query containing an excluded subtree or an unrelated field with an argument such as
filter: String.Observe that the preflight can treat that argument as the middleware's object-list filter and reject an otherwise valid request.
Expected behavior
The preflight should:
@defer,@stream, and@livewrappers transparently;ObjectListFilterargument.Actual behavior
The traversal stops at wrappers and collection element plans, allowing wrapped or nested list filters to bypass request-level coercion. It also ignores inclusion state and identifies arguments by the name
filter, which can incorrectly reject excluded subtrees or unrelated filter arguments.Known workarounds
Avoid wrapping or nesting object-list-filtered fields and avoid unrelated arguments named
filter. These are not practical general-purpose workarounds.Related information
dev/ observed while reviewingtask-seq-field-streaming-fixes