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

Force encoding to UTF-8 when concatenating sources to generate finger… #64

Merged
merged 1 commit into from
Jul 8, 2021

Conversation

robbavey
Copy link
Contributor

@robbavey robbavey commented Jul 7, 2021

…print

To get around jruby/jruby#6748, force the encoding to UTF-8.

This issue causes events containing arrays of hashes which include non US-ASCII
characters to crash the plugin if concatenating sources:

Example event that would previously cause an issue:
{"top_level":"ง","inner":[{"inner_key":"ง"},{"1":"2"}]}

This commit forces encoding of intermediate results when concatenating to UTF-8 to
get around this issue

Fixes #63

…print

To get around jruby/jruby#6748, force the encoding to UTF-8
This issue causes events containing arrays of hashes which include non US-ASCII
characters to crash the plugin if concatenating sources:

Example event that would previously cause an issue:
{"top_level":"ง","inner":[{"inner_key":"ง"},{"1":"2"}]}

This commit forces encoding of intermediate results when concatenating to UTF-8 to
get around this issue

Fixes logstash-plugins#63
Copy link
Contributor

@kaisecheng kaisecheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 I have tested locally and it can handle non-ascii char

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.

Plugin can crash if fingerprinted data includes an array of hashes including non US-ASCII characters
4 participants