Skip to content

Don't accept invalid characters#141

Closed
dchest wants to merge 1 commit intoindutny:masterfrom
dchest:invalidchar
Closed

Don't accept invalid characters#141
dchest wants to merge 1 commit intoindutny:masterfrom
dchest:invalidchar

Conversation

@dchest
Copy link
Contributor

@dchest dchest commented Mar 30, 2016

Contructor from string accepted characters out of base range.
Fix by throwing exception when such character appears in the string.

PS Spent the whole day trying to figure out why my code didn't work only to discover that I forgot to add 16 as base for constructor (similar to the test in this commit) 😅

@fanatid
Copy link
Collaborator

fanatid commented Mar 30, 2016

Related: #90 #91

Contructor from string accepted characters out of base range.
Fix by throwing exception when such character appears in the string.
@dchest
Copy link
Contributor Author

dchest commented Mar 30, 2016

@fanatid this one will just make sure that decoded number is less than base, but won't reject other characters, e.g. I think : and ;, etc. (they are between numbers and letters in ASCII) will be accepted for base 16.

@fanatid
Copy link
Collaborator

fanatid commented Nov 7, 2016

semver-major btw

@indutny
Copy link
Owner

indutny commented Nov 29, 2017

Landed in 9827640, thank you!

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.

3 participants