Skip to content
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

Merged
merged 3 commits into from Nov 7, 2018

Conversation

vladimirdolzhenko
Copy link
Contributor

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 into DeleteResponse

This PR as well fixes GetRequest / UpdateRequest / ExplainRequest validation for null and/or empty id/type.

Closes #35297

@vladimirdolzhenko vladimirdolzhenko added :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v7.0.0 labels Nov 6, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Member

@dnhatn dnhatn left a 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.

Copy link
Member

@javanna javanna left a 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

@javanna
Copy link
Member

javanna commented Nov 7, 2018

I updated labels, I think we should backport this fix to 6.5, 6.4 and 5.6

@vladimirdolzhenko vladimirdolzhenko merged commit a467a81 into elastic:master Nov 7, 2018
@vladimirdolzhenko vladimirdolzhenko deleted the fix/35297 branch November 7, 2018 11:52
vladimirdolzhenko added a commit that referenced this pull request Nov 7, 2018
…ation for null and/or empty id/type (#35314)

Closes #35297

(cherry picked from commit a467a81)
vladimirdolzhenko added a commit that referenced this pull request Nov 7, 2018
…ation for null and/or empty id/type (#35314)

Closes #35297

(cherry picked from commit a467a81)
@vladimirdolzhenko
Copy link
Contributor Author

vladimirdolzhenko commented Nov 7, 2018

7.0 -> a467a81 (this PR)
6.x -> b438921
6.5 -> 4ecb79b
6.4 -> 96638df
5.6 -> 871637b

vladimirdolzhenko added a commit that referenced this pull request Nov 7, 2018
vladimirdolzhenko added a commit that referenced this pull request Nov 7, 2018
…ation for null and/or empty id/type (#35314)

Closes #35297

(cherry picked from commit a467a81)
@colings86 colings86 added v6.5.0 and removed v6.5.1 labels Nov 9, 2018
pgomulka pushed a commit to pgomulka/elasticsearch that referenced this pull request Nov 13, 2018
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v5.6.14 v6.4.4 v6.5.0 v6.6.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete index Java REST API request throws NPE while parsing DeleteResponse
7 participants