SEC-3198: SecurityContextHolderAwareRequestWrapper#getRemoteUser ignores Authenticaion#getName #3357
Labels
in: web
An issue in web modules (web, webmvc)
type: bug
A general bug
type: jira
An issue that was migrated from JIRA
Michael Osipov (Migrated from SEC-3198) said:
The public method
getRemoteUser
tries toreturn auth.getPrincipal().toString()
but there is no guarantee that the principal which is an arbitrary implementation will acttually return the remote user. The assumption that it does is wrong. SinceAuthentication
implementsPrincipal
, it would be the safest bet toreturn auth.getName()
which is by interface guaranteed to be a proper name.The text was updated successfully, but these errors were encountered: