logstash-filter-kv icon indicating copy to clipboard operation
logstash-filter-kv copied to clipboard

Add `field_split_char` and `value_split_char` that properly do escaping.

Open yaauie opened this issue 6 years ago • 1 comments

Injecting verbatim input from field_split and value_split directives into character classes is prone to user error, requiring our users know which characters are meaningful in the regexp context and properly escaping them in their pipeline configs.

When config.support_escapes is enabled, users need to double-escape, which makes things extra tricky.

This ticket is to add two new directives (field_split_char and value_split_char), which will properly escape inputs before generating the character classes.

yaauie avatar Jul 07 '18 00:07 yaauie

@yaauie good idea. maybe we could allow field_split_char to be an array of chars, so if you need to specify multiple chars in the character classes then this will work. It could completely replace the field_split option eventually too.

colinsurprenant avatar Jul 09 '18 19:07 colinsurprenant