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
merged 7 commits into from Feb 10, 2017

Conversation

Projects
None yet
3 participants
@jhaber
Member

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

tpetr added some commits Nov 2, 2016

tpetr added some commits Nov 21, 2016

Merge pull request #1335 from HubSpot/invalid-utf8-2
replace instead of ignore so that we can update the offset

@tpetr tpetr added the hs_staging label Nov 21, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Jan 9, 2017

Member

🚢

Member

ssalinas commented on 71844e7 Jan 9, 2017

🚢

@ssalinas ssalinas merged commit dc2c4de into master Feb 10, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@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