modsecurity_audit_log_parser 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0303b7ba962015523229a03ae83e32867129d06
4
- data.tar.gz: f7bb18fa8a07687dada6ca3c9e7154c7affce545
3
+ metadata.gz: 4f70306e049985f31668a7574297f0433ef0ecad
4
+ data.tar.gz: cc699989f70a1fae7bf9fa138638b10ddb32903a
5
5
  SHA512:
6
- metadata.gz: bffeaa91475d4e19b2d927d160972c3633298322d48dfd19cdee7bf0c2349f584a0473a04c7180b92320bd42602541516424f0d0fa767a7dd64c819097ba918f
7
- data.tar.gz: abb675b5710ddb327fa0b12d0294807197613d699371265577d00940623f4d99d56998dbe540995594520c7e78cb906a6f41b0a07fd4da4ccd95a80803eff7ae
6
+ metadata.gz: 790674063871dc06eb8f7fa23dd90b8089792fd6c07800c9dac68e3f86105846cd99dcec7967a7ead4a8527879a4ad436d43b545e76ad7fdf4cf6408033eca1e
7
+ data.tar.gz: f3110b9a6d9260f8a8768057c67e1785300a7596df4f2d47f6a1525d5f84ff25f562b5b189578c8381fcea6dc06ac68adda96d7ae94af31a6b697a49769e7a4d
@@ -298,7 +298,7 @@ class ModsecurityAuditLogParser
298
298
  def initialize(json)
299
299
  @tran = json[:transaction] || {}
300
300
  @producer = @tran[:producer] || {}
301
- @msg = (@tran[:messages] || []).first
301
+ @msg = (@tran[:messages] || []).first || {}
302
302
  @detail = @msg[:details] || {}
303
303
  end
304
304
 
@@ -352,7 +352,7 @@ class ModsecurityAuditLogParser
352
352
  json = JSON.parse(@buf, symbolize_names: true, create_additions: false)
353
353
  yield Log.new(json)
354
354
  @buf.clear
355
- rescue
355
+ rescue JSON::ParserError
356
356
  # incomplete
357
357
  end
358
358
  end
@@ -1,3 +1,3 @@
1
1
  class ModsecurityAuditLogParser
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modsecurity_audit_log_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Nakamura