Calling endpoint with $compute when Compute is not allowed in settings, still parses the whole expression
Open
bug
followup
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Assemblies affected
ASP.NET Core OData 8.0.11
Describe the bug
I have an endpoint where I explicitly disallow all query options, but when I pass make a request using $compute, it still parses the expression.
Reproduce steps
Using the ODataRoutingSample:
- On the
PeopleControllerchange the [EnableQuery] on the get to[EnableQuery(AllowedQueryOptions = AllowedQueryOptions.None)]
Request/Response
- perform the request
/people/$compute=test add p12m
Reponse tells me that the compute expression is invalid
Expected behavior
Expected the error "The query specified in the URI is not valid. Query option 'Compute' is not allowed."
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.