-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Search fails when from parameter is negative #11290
Comments
@soosinha what version of OpenSearch are you running? |
@soosinha -- Would you mind adding a YAML test to reproduce this? It should be pretty reproducible. Thanks. |
This bug is easy to reproduce, but in my env with main branch, the error is
, after diving deep into it, I found that we never validate the from and size parameters in the request body, but validate the same parameters in the query path
, response:
, request:
, response:
. OpenSearch/server/src/main/java/org/opensearch/rest/action/search/RestSearchAction.java Line 240 in 618782d
|
If no one is working on this, I want to have a try. |
Describe the bug
When the
from
parameter in the search query is negative, the search fails with search_phase_execution_exception (HTTP status 500)To Reproduce
Steps to reproduce the behavior:
my-index
Expected behavior
Search should fail with illegal_argument_exception (HTTP status 400)
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: