Skip to content

HttpUnitUtils does not check the validity of input String#1

Open
emopers wants to merge 1 commit intokohsuke:masterfrom
emopers:hasMoreElments_168
Open

HttpUnitUtils does not check the validity of input String#1
emopers wants to merge 1 commit intokohsuke:masterfrom
emopers:hasMoreElments_168

Conversation

@emopers
Copy link

@emopers emopers commented Nov 26, 2015

HttpUnitUtils.java directly calls 'st.nextToken()' on 'java.util.StringTokenizer st'
without checking if there are more tokens. Because 'st' is built from the String header
that can be invalid (e.g., an empty String), this can lead to a runtime exception
without a useful error message. This pull request adds an error message and a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant