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

strings not escaped in WriteBulkBytes #258

Open
fcheslack opened this issue Feb 26, 2016 · 0 comments
Open

strings not escaped in WriteBulkBytes #258

fcheslack opened this issue Feb 26, 2016 · 0 comments

Comments

@fcheslack
Copy link

Because it's not using actual JSON encoding, it's possible to cause errors when strings with various special characters appear in the non-data fields passed to WriteBulkBytes. Some of these should be rejected (or handled gracefully elastic/elasticsearch#9059) by elasticsearch anyway, but they don't even get that far because it sends invalid JSON.

This can be fixed by actually JSON marshaling the strings, or the entire bulk operation command (which is what I ended up doing for now), along with the data payload. I assume though that this was being avoided in the first place because of a performance penalty?

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

No branches or pull requests

1 participant