Skip to content

SEC-3198: SecurityContextHolderAwareRequestWrapper#getRemoteUser ignores Authenticaion#getName #3357

Closed
@spring-projects-issues

Description

@spring-projects-issues

Michael Osipov (Migrated from SEC-3198) said:

The public method getRemoteUser tries to return 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. Since Authentication implements Principal, it would be the safest bet to return auth.getName() which is by interface guaranteed to be a proper name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webAn issue in web modules (web, webmvc)type: bugA general bugtype: jiraAn issue that was migrated from JIRA

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions