Skip to content

SEC-2548: AuthenticationSwitchUserEvent is published before the actual Authentication object is placed in SecurityContext #2762

@spring-projects-issues

Description

@spring-projects-issues

Anders Steiner (Migrated from SEC-2548) said:

The AuthenticationSwitchUserEvent is published in attemptSwitchUser method before the Authentication object is placed in the Security Context. The event should be published after line 158 where SecurityContextHolder.getContext().setAuthentication(targetUser); is called.

The issue is also there when trying to exit an user, The event is published in attemptExitUser when it should be published in the doFilter method after line 173.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA general bugtype: jiraAn issue that was migrated from JIRA

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions