Skip to content

Commit

Permalink
Avoid URI.encode_www_form_component which is not like the old URI.enc…
Browse files Browse the repository at this point in the history
…ode. Prefer URI::Parser's escape
  • Loading branch information
andsel committed Feb 21, 2023
1 parent ca16bbe commit 58dfef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ module Environment

# Windows safe way to produce a file: URI.
file_schema = "file://" + (LogStash::Environment.windows? ? "/" : "")
LogStash::Logging::Logger::reconfigure(::URI.encode_www_form_component(file_schema + ::File.absolute_path(log4j_config_location)))
LogStash::Logging::Logger::reconfigure(::URI::Parser.new.escape(file_schema + ::File.absolute_path(log4j_config_location)))
end
# override log level that may have been introduced from a custom log4j config file
LogStash::Logging::Logger::configure_logging(settings.get("log.level"))
Expand Down

0 comments on commit 58dfef7

Please sign in to comment.