logstash-plugins / logstash-filter-translate

Translate filter for Logstash
Apache License 2.0
21 stars 47 forks source link

Fix the limitation of the size of yaml file that exceeds 3MB #97

Closed kaisecheng closed 1 year ago

kaisecheng commented 1 year ago

Fixed: #96

added setting yaml_dictionary_code_point_limit to config the maximum code point limit of the yaml file in dictionary_path to overcome the 3MB size limit from SnakeYaml 1.33. This setting is only effective for yaml. Yaml file over the size limit throws an exception. JSON and CSV currently do not have such restriction. The default value of yaml_dictionary_code_point_limit is 128MB.

How to test

mashhurs commented 1 year ago

Changes overall LGTM by agreeing @jsvd 's comments. One thing I would like to clarify here, Psych moved from snakeyaml to snakeyaml-engine this year. The reason behind as I understood to mitigate the CVE risks and performances (snakeyaml-engine is more suitable in JVM env). This change also indicates that under the hood we are moving to snakeyaml-engine AND for the long term we should/may move our snakeyaml dependencies to snakeyaml-engine as well.

Reference thread: link