Skip to content

Validation of frame content in org.springframework.web.socket.sockjs.frame.SockJsFrame is a NoOp [SPR-13019] #17610

@spring-projects-issues

Description

@spring-projects-issues

Joakim Örtbrant opened SPR-13019 and commented

Validation of frame content in org.springframework.web.socket.sockjs.frame.SockJsFrame#SockJsFrame
is not doing anything since first line in constructor:
StringUtils.hasText(content) returns a boolean that is not checked, when content is empty it instead fails on this line:
else if (content.charAt(0) == 'a') with a java.lang.StringIndexOutOfBoundsException: String index out of range: 0 exception.

Please update so that a proper exception is thrown


Affects: 4.1.6

Referenced from: commits 633d13f, 02d28ae

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