logstash-filter-xml 4.1.1 → 4.2.0

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
  SHA256:
3
- metadata.gz: 6219dbfef9c7bd16f8407575325b90a2348c8003a3b1b131e9ef659fdf559cf8
4
- data.tar.gz: d24834789afc1f58c9f12c4e37f7c792308ec8bf781ac8bf30f5abfb85f97e91
3
+ metadata.gz: 41486355fca6576c993aabd98476dd39888ba6467b8f91f3a4e76d3d45da06b0
4
+ data.tar.gz: 13ea42b6f0b45fcf03051b468965b342e6d02b72c5ee41a8bb5ae08423dfe714
5
5
  SHA512:
6
- metadata.gz: f91a615ab60c1910cab4752ef8f2dc37a1dfa7f3fb364f837c39bd271d5131541d608cbfe9cdf2d32a8369efa2dc6bfc76a1720dc5426cee3b42bc2d3c09fa34
7
- data.tar.gz: 50372739d44fffeef3df70ce87eb973b40cc0b903c658b067aea48adc61b5937345b73cf21c4f241c17ae5cc7d901b455fcb053ee65f2eb242cfdaca24cad4e1
6
+ metadata.gz: 938a1e47c3739672583e4cad10c6083a092335bb3191a6479b4da757d14d9dca02542446f1bb2db3d87cbf77860f2cb7e9b1759a4fad5b82baaaf73cd6c83902
7
+ data.tar.gz: 67e01e1ce39cd128bad8f1450d542f8c5ecf79ad3268675fb01f415d26c196f0b3ff7b71ac880ba248474b6be8a82310fe24aa76d1f3dbcdcf404767be20c839
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 4.2.0
2
+ - Update Nokogiri dependency version [#78](https://github.com/logstash-plugins/logstash-filter-xml/pull/78)
3
+
4
+ ## 4.1.3
5
+ - [DOC] Updated URL for current xsl reference docs [#70](https://github.com/logstash-plugins/logstash-filter-xml/pull/70)
6
+ - [DOC] Added info about non valid characters [#72](https://github.com/logstash-plugins/logstash-filter-xml/pull/72)
7
+
8
+ ## 4.1.2
9
+ - [DOC] Updated docs to correct name of parse_options config option [#75](https://github.com/logstash-plugins/logstash-filter-xml/pull/75)
10
+
1
11
  ## 4.1.1
2
12
  - Fix: exceptions thrown while handling events no longer crash the pipeline [#73](https://github.com/logstash-plugins/logstash-filter-xml/pull/73)
3
13
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Logstash Plugin
2
2
 
3
- [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-filter-xml.svg)](https://travis-ci.org/logstash-plugins/logstash-filter-xml)
3
+ [![Travis Build Status](https://travis-ci.com/logstash-plugins/logstash-filter-xml.svg)](https://travis-ci.com/logstash-plugins/logstash-filter-xml)
4
4
 
5
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
6
6
 
data/docs/index.asciidoc CHANGED
@@ -34,7 +34,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
34
34
  | <<plugins-{type}s-{plugin}-force_array>> |<<boolean,boolean>>|No
35
35
  | <<plugins-{type}s-{plugin}-force_content>> |<<boolean,boolean>>|No
36
36
  | <<plugins-{type}s-{plugin}-namespaces>> |<<hash,hash>>|No
37
- | <<plugins-{type}s-{plugin}-parser_options>> |<<string,string>>|No
37
+ | <<plugins-{type}s-{plugin}-parse_options>> |<<string,string>>|No
38
38
  | <<plugins-{type}s-{plugin}-remove_namespaces>> |<<boolean,boolean>>|No
39
39
  | <<plugins-{type}s-{plugin}-source>> |<<string,string>>|Yes
40
40
  | <<plugins-{type}s-{plugin}-store_xml>> |<<boolean,boolean>>|No
@@ -88,17 +88,29 @@ filter {
88
88
  }
89
89
  }
90
90
 
91
- [id="plugins-{type}s-{plugin}-parser_options"]
92
- ===== `parser_options`
91
+ [id="plugins-{type}s-{plugin}-parse_options"]
92
+ ===== `parse_options`
93
93
 
94
94
  * Value type is <<string,string>>
95
95
  * There is no default value for this setting.
96
96
 
97
- Setting XML parser options allows for more control of the parsing process.
97
+ Setting XML parse options allows for more control of the parsing process.
98
98
  By default the parser is not strict and thus accepts some invalid content.
99
99
  Currently supported options are:
100
100
 
101
101
  - `strict` - forces the parser to fail early instead of accumulating errors when content is not valid xml.
102
+
103
+ Control characters such as ASCII 0x0 are not allowed and _always_ result in non-valid XML.
104
+
105
+ When XML content is not valid, it will be tagged as `_xmlparsefailure`.
106
+
107
+ XML specs:
108
+
109
+ * XML 1.0 Spec: https://www.w3.org/TR/2008/REC-xml-20081126/#charsets
110
+ * XML 1.1 Spec: https://www.w3.org/TR/xml11/#charsets
111
+
112
+
113
+
102
114
 
103
115
  [id="plugins-{type}s-{plugin}-remove_namespaces"]
104
116
  ===== `remove_namespaces`
@@ -187,10 +199,12 @@ destination field. Multiple values returned will be pushed onto the
187
199
  destination field as an array. As such, multiple matches across
188
200
  multiple source fields will produce duplicate entries in the field.
189
201
 
190
- More on XPath: http://www.w3schools.com/xml/xml_xpath.asp
202
+ [id="plugins-{type}s-{plugin}-xpath_resources"]
203
+ ====== Additional XPath resources
204
+
205
+ For more information on XPath, see https://www.w3schools.com/xml/xml_xpath.asp.
191
206
 
192
- The XPath functions are particularly powerful:
193
- http://www.w3schools.com/xsl/xsl_functions.asp
207
+ The https://www.w3schools.com/xml/xsl_functions.asp[XPath functions] are particularly powerful.
194
208
 
195
209
 
196
210
 
@@ -51,10 +51,10 @@ class LogStash::Filters::Xml < LogStash::Filters::Base
51
51
  # destination field as an array. As such, multiple matches across
52
52
  # multiple source fields will produce duplicate entries in the field.
53
53
  #
54
- # More on XPath: http://www.w3schools.com/xml/xml_xpath.asp
54
+ # More on XPath: https://www.w3schools.com/xml/xml_xpath.asp
55
55
  #
56
56
  # The XPath functions are particularly powerful:
57
- # http://www.w3schools.com/xsl/xsl_functions.asp
57
+ # https://www.w3schools.com/xml/xsl_functions.asp
58
58
  #
59
59
  config :xpath, :validate => :hash, :default => {}
60
60
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-xml'
4
- s.version = '4.1.1'
4
+ s.version = '4.2.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Parses XML into fields"
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"
@@ -20,8 +20,9 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
21
21
 
22
22
  # Gem dependencies
23
+ s.add_runtime_dependency 'logstash-core', '>= 8.4.0' # this provides Ruby 2.6.0
23
24
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
- s.add_runtime_dependency 'nokogiri'
25
+ s.add_runtime_dependency 'nokogiri', '>= 1.13.8' # >= 1.13.0 requires Ruby 2.6+
25
26
  s.add_runtime_dependency 'xml-simple'
26
27
 
27
28
  s.add_development_dependency 'logstash-devutils'
@@ -436,7 +436,7 @@ describe LogStash::Filters::Xml do
436
436
  end
437
437
 
438
438
  context 'strict option' do
439
- let(:options) { super.merge({ 'parse_options' => 'strict' }) }
439
+ let(:options) { super().merge({ 'parse_options' => 'strict' }) }
440
440
 
441
441
  it 'does fail parsing' do
442
442
  subject.filter(event)
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-03 00:00:00.000000000 Z
11
+ date: 2022-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 8.4.0
19
+ name: logstash-core
20
+ prerelease: false
21
+ type: :runtime
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 8.4.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  requirement: !ruby/object:Gem::Requirement
15
29
  requirements:
@@ -35,7 +49,7 @@ dependencies:
35
49
  requirements:
36
50
  - - ">="
37
51
  - !ruby/object:Gem::Version
38
- version: '0'
52
+ version: 1.13.8
39
53
  name: nokogiri
40
54
  prerelease: false
41
55
  type: :runtime
@@ -43,7 +57,7 @@ dependencies:
43
57
  requirements:
44
58
  - - ">="
45
59
  - !ruby/object:Gem::Version
46
- version: '0'
60
+ version: 1.13.8
47
61
  - !ruby/object:Gem::Dependency
48
62
  requirement: !ruby/object:Gem::Requirement
49
63
  requirements:
@@ -125,8 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
139
  - !ruby/object:Gem::Version
126
140
  version: '0'
127
141
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.6.13
142
+ rubygems_version: 3.2.29
130
143
  signing_key:
131
144
  specification_version: 4
132
145
  summary: Parses XML into fields