mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- clone defaults if necessary, otherwise we might accidentally share the
same 'default' hash instance with all instances of a plugin, and that causes problems. This fixes a bug found in the grok filter test.
This commit is contained in:
parent
27f501abb8
commit
c7d0b24b36
1 changed files with 5 additions and 1 deletions
|
@ -65,7 +65,11 @@ module LogStash::Config::Mixin
|
|||
@logger.debug("Converting default value in #{self.class.name} (#{name}) to password object")
|
||||
params[name.to_s] = ::LogStash::Util::Password.new(opts[:default])
|
||||
else
|
||||
params[name.to_s] = opts[:default]
|
||||
default = opts[:default]
|
||||
if default.is_a?(Array) or default.is_a?(Hash)
|
||||
default = default.clone
|
||||
end
|
||||
params[name.to_s] = default
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue