Skip to content

SessionDisconnectEvent.getUser() returns null instead of the session user [SPR-13871] #18444

@spring-projects-issues

Description

@spring-projects-issues

Pierre Fouché opened SPR-13871 and commented

The problem is in org.springframework.web.socket.messaging.SessionDisconnectEvent, line 56.
Current code is:

public SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId,
			CloseStatus closeStatus, Principal user) {
		super(source, message);

user is lost.
Should be:

public SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId,
			CloseStatus closeStatus, Principal user) {
		super(source, message, user);

Affects: 4.2.4

Referenced from: commits cdc9bf7, 4fc6ead

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions