Skip to content

strings not escaped in WriteBulkBytes #258

Description

@fcheslack

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions