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
Fix DeleteRequest validation for nullable or empty id/type #35314
Conversation
…ation for null and/or empty id/type Closes elastic#35297
Pinging @elastic/es-distributed |
server/src/main/java/org/elasticsearch/action/delete/DeleteRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/explain/ExplainRequest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I left a minor nit.
server/src/main/java/org/elasticsearch/action/delete/DeleteRequest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks a lot @vladimirdolzhenko
I updated labels, I think we should backport this fix to 6.5, 6.4 and 5.6 |
…ation for null and/or empty id/type (elastic#35314) Closes elastic#35297
Actually if you send a delete document request like
DeleteRequest("index", "", "")
instead of error you effectively execute delete index and get NPE as{acknowledged=true}
could not be parsed intoDeleteResponse
This PR as well fixes GetRequest / UpdateRequest / ExplainRequest validation for null and/or empty id/type.
Closes #35297