mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 14:17:58 -04:00
* fix: restore support for unicode pipeline- and plugin-id's JRuby's `Ruby#newSymbol(String)` throws an exception when provided a `String` that contains characters outside of lower-ASCII because JRuby internals expect "the incoming String to be one of our mangled ISO-8859-1 strings" as noted in a comment on jruby/jruby#6217. Instead, we use `Ruby#newString(String)` to create a new `RubyString` (which works properly), and then rely on `RubyString#intern` to get our `RubySymbol`. This fixes a regression introduced in the 8.7 series in which pipeline id's are consistently represented as ruby symbols in the metrics store, and ensures similar issue does not exist when specifying a plugin id that contains characters above the lower-ASCII plane. * fix: use properly-encoded RubySymbol in PipelineConfig We cannot rely on `RubySymbol#toString` to produce a properly-encoded `String` whe the string contains characters above the lower-ASCII plane because the result is effectively a binary ruby-internal marshal of the bytes that only holds when the symbol contains lower-ASCII. Instead, we can use the internally-memoizing `RubySymbol#name` to get a properly-encoded `RubyString`, and `RubyString#asJavaString()` to get a properly-encoded java-`String`. * fix: properly serialize unicode pipeline names in API output Jackson's JSON serializer leaks the JRuby-internal byte structure of Symbols, which only aligns with the byte-structure of the symbol's actual string when that string is wholly-comprised of lower-ASCII characters. By pre-converting Symbols to Strings, we ensure that the result is readable and useful. * spec: bypass monitoring specs for unicode pipeline ids when PQ enabled |
||
---|---|---|
.. | ||
cli | ||
01_logstash_bin_smoke_spec.rb | ||
beats_input_spec.rb | ||
command_line_spec.rb | ||
deprecation_log_spec.rb | ||
direct_heap_allocator_flag_spec.rb | ||
dlq_spec.rb | ||
env_variables_condition_spec.rb | ||
env_variables_config_spec.rb | ||
es_output_how_spec.rb | ||
fatal_error_spec.rb | ||
install_java_plugin_spec.rb | ||
java_api_spec.rb | ||
kafka_input_spec.rb | ||
logstash_to_logstash_spec.rb | ||
mixed_codec_spec.rb | ||
monitoring_api_spec.rb | ||
multiple_pipeline_spec.rb | ||
pipeline_log_spec.rb | ||
plugin_name_log_spec.rb | ||
reload_config_spec.rb | ||
reserved_tags_field_spec.rb | ||
secret_store_spec.rb | ||
settings_spec.rb | ||
slowlog_spec.rb | ||
spec_helper.rb | ||
webserver_spec.rb |