logstash-codec-idmef 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 687a8fdbf7434f7a0cc7062d44463550a7b6f5922bb41086fc01ccd8db0711a1
4
- data.tar.gz: d3c65c530b4e8b74eca83a9c6ba3eaf1ba9293a22860ea256447407cd13e8f69
3
+ metadata.gz: bee9b9f0182fef0bcd42950cca6f2054c1ae67ae930af3f595de7c5585e469a3
4
+ data.tar.gz: a01247e5d91019463034e22409f78ebb5edc3070da618af8d3aad975457bb9e5
5
5
  SHA512:
6
- metadata.gz: f416eeb9bc08f9d9c6c1d8241a3377ddb92fc47421f62053b5f1f791fb2a8f9b0683e0065c0630488724c23eb3dc9fafbab471acdf8a5c87843faccbb83cf970
7
- data.tar.gz: bc4d4fba048ac2ece7058b86af575b4d5ee43217236834e0ab2d1f62b0fe0288a95d8654d0ba40efda50ec23ef7ad07cd3315afaad7095af8b390ba73d46973a
6
+ metadata.gz: 9d4c5fd3c37b23c0ac9a640353d61a3d1466832cd4260b577410b3f9edf891b61c382b12f238d43e8608dcc38bd06f108c5b483c742d16b85e4794e623f6ed87
7
+ data.tar.gz: 141900ff71dc0067a6d80eb6fdee557ebfd034792abe859cb87fbfce914be00183fd428cf541e5f4d2282829fee0f68287326f3e22c3d3a49b89983bf716b09a
@@ -1,3 +1,6 @@
1
+ ## 0.9.2
2
+ - Fix empty AdditionalData
3
+
1
4
  ## 0.9.1
2
5
  - Fix various DTD issues
3
6
 
@@ -463,6 +463,9 @@ class LogStash::Codecs::IDMEF < LogStash::Codecs::Base
463
463
  if @additionaldata
464
464
  idx = xml.xpath('/IDMEF-Message/Alert/AddionnalData').length
465
465
  e.to_hash.each do |key, value|
466
+ if value.to_s.empty?
467
+ next
468
+ end
466
469
  if value.kind_of?(Integer)
467
470
  t = "integer"
468
471
  elsif value.kind_of?(Float)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-idmef'
4
- s.version = '0.9.1'
4
+ s.version = '0.9.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Create IDMEF in XML"
7
7
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -15,7 +15,7 @@ describe LogStash::Codecs::IDMEF do
15
15
  it "should return proper IDMEF XML from event" do
16
16
  codec.on_event{|data, newdata| results << newdata}
17
17
  codec.paths = {"alert.messageid" => "67a63ad4-11b9-4ee2-8aee-d1c032a13b35" }
18
- event = LogStash::Event.new("@timestamp" => DateTime.parse("2020-05-24T09:05:26.758Z").to_time, "host" => "localhost.localdomain", "message" => "Login attempt", "@version" => "1")
18
+ event = LogStash::Event.new("@timestamp" => DateTime.parse("2020-05-24T09:05:26.758Z").to_time, "host" => "localhost.localdomain", "message" => "Login attempt", "@version" => "1", "msg" => "")
19
19
  codec.encode(event)
20
20
  insist {results.first} == expected_result
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-idmef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prelude Team