Skip to content

[Backport 7.x] Don't allow null User.principal #52049

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

Merged
merged 2 commits into from
Feb 10, 2020

Conversation

tvernum
Copy link
Contributor

@tvernum tvernum commented Feb 7, 2020

Some parts of the User class (e.g. equals/hashCode) assumed that
principal could never be null, but the constructor didn't enforce
that.

This adds a null check into the constructor and fixes a few tests that
relied on being able to pass in null usernames.

Backport of: #51988

Some parts of the User class (e.g. equals/hashCode) assumed that
principal could never be null, but the constructor didn't enforce
that.

This adds a null check into the constructor and fixes a few tests that
relied on being able to pass in null usernames.

Backport of: elastic#51988
@tvernum
Copy link
Contributor Author

tvernum commented Feb 8, 2020

@elasticmachine run elasticsearch-ci/packaging-sample-matrix-windows
(All windows workers were offline)

@tvernum
Copy link
Contributor Author

tvernum commented Feb 10, 2020

@elasticmachine update branch

@tvernum tvernum merged commit d5c0150 into elastic:7.x Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants