Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-issuemaster opened this issue May 13, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented May 13, 2015

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

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented May 13, 2015

Juergen Hoeller commented

Good catch! The code is supposed to call Assert.hasText there...

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.