Skip to content

SEC-2012: Javadoc for UserDetails.getPassword() says that the password is never null; however it may be #2238

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

Closed
spring-projects-issues opened this issue Jul 19, 2012 · 2 comments
Assignees
Labels
in: docs An issue in Documentation or samples type: bug A general bug type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

Mauro Molinari (Migrated from SEC-2012) said:

The Javadoc for org.springframework.security.core.userdetails.UserDetails.getPassword() says:

Returns the password used to authenticate the user. Cannot return null.

Returns:
the password (never null)

However, if the concrete implementation of UserDetails also implements org.springframework.security.core.CredentialsContainer (and this is the case for org.springframework.security.core.userdetails.User, for instance), then the password may actually be null if the credentials have been deleted by a call to org.springframework.security.core.CredentialsContainer.eraseCredentials(). See org.springframework.security.core.userdetails.User.eraseCredentials(), for instance.

@spring-projects-issues
Copy link
Author

Mauro Molinari said:

Thank you Rob, but please note that you left out the part of the Javadoc that says "Cannot return null.".

@spring-projects-issues
Copy link
Author

Rob Winch said:

It should be updated in master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: bug A general bug type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

2 participants