You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Negative from/size on search endpoints reach the search engine and fail as a server error #35037
The search endpoints pass the from and size query parameters to Elasticsearch/OpenSearch without validating them. A negative value such as
GET /api/v1/search/query?q=*&index=user&from=-25&size=25
is only rejected by the engine, with [from] parameter cannot be negative, found [-25]:
On 2.0.x every such request fails as a 500 and logs a full server-side stack trace.
On main, Fixes #27990: stop malformed search input failing as a server error #33655 turned the engine's 400 into a 400 for /v1/search/query, but the request still makes a round trip to the engine. /v1/search/nlq/query and /v1/search/fieldQuery still return 500, and the /v1/search/preview request body has the same gap.
To Reproduce
As an admin, call GET /api/v1/search/fieldQuery?fieldName=name&fieldValue=orders&index=table_search_index&from=-25.
The response is 500 UNHANDLED_SERVER_EXCEPTION, wrapping the engine's illegal_argument_exception.
On 2.0.x, GET /api/v1/search/query?q=*&index=user&from=-25&size=25 fails the same way.
Expected behavior
A negative from or size is rejected with a 400 that names the parameter, before any search runs.
Activity
Fixes open-metadata#35037: reject negative search pagination before i…
fix(search): prevent negative offsets from UI pagination (open-metada…
Fixes #35293: Glossary CSV docs, approval by non-reviewers, and expec…