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

Sanitize file data before parsing with Jackson #1334

merged 7 commits into from Feb 10, 2017


Copy link

@jhaber jhaber commented Nov 1, 2016

This takes the raw response from Mesos and decodes it with a UTF8 decoder that ignores invalid characters before passing the sanitized data to Jackson for parsing (which should now always succeed). Since these responses can be non-trivial in size I tried to avoid extra allocations as much as possible (the Response class exposes the data as a ByteBuffer which gets converted to a CharBuffer which backs the Reader passed to Jackson).

@tpetr @ssalinas

@ssalinas ssalinas modified the milestone: 0.12.0 Nov 2, 2016
Tom Petr added 2 commits Nov 21, 2016
replace instead of ignore so that we can update the offset
@ssalinas ssalinas modified the milestones: 0.13.0, 0.14.0 Dec 8, 2016
@ssalinas ssalinas added the hs_qa label Dec 13, 2016
@tpetr tpetr added the hs_stable label Jan 9, 2017
@ssalinas ssalinas merged commit dc2c4de into master Feb 10, 2017
@ssalinas ssalinas deleted the invalid-utf8 branch Feb 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants