nokogiri 1.10.10 → 1.11.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -17
  3. data/ext/nokogiri/extconf.rb +44 -35
  4. data/ext/nokogiri/nokogiri.c +12 -6
  5. data/ext/nokogiri/nokogiri.h +1 -0
  6. data/ext/nokogiri/xml_document.c +10 -1
  7. data/ext/nokogiri/xml_node.c +20 -0
  8. data/ext/nokogiri/xml_schema.c +0 -29
  9. data/ext/nokogiri/xslt_stylesheet.c +0 -4
  10. data/lib/nokogiri.rb +2 -19
  11. data/lib/nokogiri/css.rb +1 -0
  12. data/lib/nokogiri/css/node.rb +1 -0
  13. data/lib/nokogiri/css/parser.rb +1 -0
  14. data/lib/nokogiri/css/parser_extras.rb +1 -0
  15. data/lib/nokogiri/css/syntax_error.rb +1 -0
  16. data/lib/nokogiri/css/tokenizer.rb +1 -0
  17. data/lib/nokogiri/css/xpath_visitor.rb +3 -1
  18. data/lib/nokogiri/decorators/slop.rb +1 -0
  19. data/lib/nokogiri/html.rb +1 -0
  20. data/lib/nokogiri/html/builder.rb +1 -0
  21. data/lib/nokogiri/html/document.rb +1 -0
  22. data/lib/nokogiri/html/document_fragment.rb +1 -0
  23. data/lib/nokogiri/html/element_description.rb +1 -0
  24. data/lib/nokogiri/html/element_description_defaults.rb +1 -0
  25. data/lib/nokogiri/html/entity_lookup.rb +1 -0
  26. data/lib/nokogiri/html/sax/parser.rb +1 -0
  27. data/lib/nokogiri/html/sax/parser_context.rb +1 -0
  28. data/lib/nokogiri/html/sax/push_parser.rb +1 -0
  29. data/lib/nokogiri/jruby/dependencies.rb +20 -0
  30. data/lib/nokogiri/syntax_error.rb +1 -0
  31. data/lib/nokogiri/version.rb +85 -45
  32. data/lib/nokogiri/xml.rb +1 -0
  33. data/lib/nokogiri/xml/attr.rb +1 -0
  34. data/lib/nokogiri/xml/attribute_decl.rb +1 -0
  35. data/lib/nokogiri/xml/builder.rb +1 -0
  36. data/lib/nokogiri/xml/cdata.rb +1 -0
  37. data/lib/nokogiri/xml/character_data.rb +1 -0
  38. data/lib/nokogiri/xml/document.rb +3 -8
  39. data/lib/nokogiri/xml/document_fragment.rb +1 -0
  40. data/lib/nokogiri/xml/dtd.rb +1 -0
  41. data/lib/nokogiri/xml/element_content.rb +1 -0
  42. data/lib/nokogiri/xml/element_decl.rb +1 -0
  43. data/lib/nokogiri/xml/entity_decl.rb +1 -0
  44. data/lib/nokogiri/xml/entity_reference.rb +1 -0
  45. data/lib/nokogiri/xml/namespace.rb +1 -0
  46. data/lib/nokogiri/xml/node.rb +26 -12
  47. data/lib/nokogiri/xml/node/save_options.rb +1 -0
  48. data/lib/nokogiri/xml/node_set.rb +1 -0
  49. data/lib/nokogiri/xml/notation.rb +1 -0
  50. data/lib/nokogiri/xml/parse_options.rb +4 -3
  51. data/lib/nokogiri/xml/pp.rb +1 -0
  52. data/lib/nokogiri/xml/pp/character_data.rb +1 -0
  53. data/lib/nokogiri/xml/pp/node.rb +1 -0
  54. data/lib/nokogiri/xml/processing_instruction.rb +1 -0
  55. data/lib/nokogiri/xml/reader.rb +7 -3
  56. data/lib/nokogiri/xml/relax_ng.rb +1 -0
  57. data/lib/nokogiri/xml/sax.rb +1 -0
  58. data/lib/nokogiri/xml/sax/document.rb +1 -0
  59. data/lib/nokogiri/xml/sax/parser.rb +1 -0
  60. data/lib/nokogiri/xml/sax/parser_context.rb +1 -0
  61. data/lib/nokogiri/xml/sax/push_parser.rb +1 -0
  62. data/lib/nokogiri/xml/schema.rb +1 -0
  63. data/lib/nokogiri/xml/searchable.rb +1 -0
  64. data/lib/nokogiri/xml/syntax_error.rb +1 -0
  65. data/lib/nokogiri/xml/text.rb +1 -0
  66. data/lib/nokogiri/xml/xpath.rb +1 -0
  67. data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -0
  68. data/lib/nokogiri/xml/xpath_context.rb +1 -0
  69. data/lib/nokogiri/xslt.rb +1 -0
  70. data/lib/nokogiri/xslt/stylesheet.rb +1 -0
  71. data/lib/xsd/xmlparser/nokogiri.rb +1 -0
  72. metadata +27 -27
  73. data/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch +0 -32
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xml/pp/node'
2
3
  require 'nokogiri/xml/pp/character_data'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module PP
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module PP
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class ProcessingInstruction < Node
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ###
@@ -87,9 +88,12 @@ module Nokogiri
87
88
  ###
88
89
  # Get a list of attributes for the current node.
89
90
  def attributes
90
- Hash[attribute_nodes.map { |node|
91
- [node.name, node.to_s]
92
- }].merge(namespaces || {})
91
+ attrs_hash = attribute_nodes.each_with_object({}) do |node, hash|
92
+ hash[node.name] = node.to_s
93
+ end
94
+ ns = namespaces
95
+ attrs_hash.merge!(ns) if ns
96
+ attrs_hash
93
97
  end
94
98
 
95
99
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class << self
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xml/sax/document'
2
3
  require 'nokogiri/xml/sax/parser_context'
3
4
  require 'nokogiri/xml/sax/parser'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module SAX
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module SAX
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  module SAX
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class << self
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class Text < Nokogiri::XML::CharacterData
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xml/xpath/syntax_error'
2
3
 
3
4
  module Nokogiri
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class XPath
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XML
3
4
  class XPathContext
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/xslt/stylesheet'
2
3
 
3
4
  module Nokogiri
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module XSLT
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri'
2
3
 
3
4
  module XSD # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.10
4
+ version: 1.11.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2020-07-06 00:00:00.000000000 Z
17
+ date: 2020-02-02 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: mini_portile2
@@ -36,14 +36,28 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.24'
39
+ version: '0.30'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.24'
46
+ version: '0.30'
47
+ - !ruby/object:Gem::Dependency
48
+ name: hoe
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.18'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.18'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: hoe-bundler
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -134,28 +148,28 @@ dependencies:
134
148
  requirements:
135
149
  - - "~>"
136
150
  - !ruby/object:Gem::Version
137
- version: '12.0'
151
+ version: '13.0'
138
152
  type: :development
139
153
  prerelease: false
140
154
  version_requirements: !ruby/object:Gem::Requirement
141
155
  requirements:
142
156
  - - "~>"
143
157
  - !ruby/object:Gem::Version
144
- version: '12.0'
158
+ version: '13.0'
145
159
  - !ruby/object:Gem::Dependency
146
160
  name: rake-compiler
147
161
  requirement: !ruby/object:Gem::Requirement
148
162
  requirements:
149
163
  - - "~>"
150
164
  - !ruby/object:Gem::Version
151
- version: 1.1.0
165
+ version: '1.1'
152
166
  type: :development
153
167
  prerelease: false
154
168
  version_requirements: !ruby/object:Gem::Requirement
155
169
  requirements:
156
170
  - - "~>"
157
171
  - !ruby/object:Gem::Version
158
- version: 1.1.0
172
+ version: '1.1'
159
173
  - !ruby/object:Gem::Dependency
160
174
  name: rake-compiler-dock
161
175
  requirement: !ruby/object:Gem::Requirement
@@ -232,20 +246,6 @@ dependencies:
232
246
  - - "<"
233
247
  - !ruby/object:Gem::Version
234
248
  version: '7'
235
- - !ruby/object:Gem::Dependency
236
- name: hoe
237
- requirement: !ruby/object:Gem::Requirement
238
- requirements:
239
- - - "~>"
240
- - !ruby/object:Gem::Version
241
- version: '3.22'
242
- type: :development
243
- prerelease: false
244
- version_requirements: !ruby/object:Gem::Requirement
245
- requirements:
246
- - - "~>"
247
- - !ruby/object:Gem::Version
248
- version: '3.22'
249
249
  description: |-
250
250
  Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among
251
251
  Nokogiri's many features is the ability to search documents via XPath
@@ -397,6 +397,7 @@ files:
397
397
  - lib/nokogiri/html/sax/parser.rb
398
398
  - lib/nokogiri/html/sax/parser_context.rb
399
399
  - lib/nokogiri/html/sax/push_parser.rb
400
+ - lib/nokogiri/jruby/dependencies.rb
400
401
  - lib/nokogiri/syntax_error.rb
401
402
  - lib/nokogiri/version.rb
402
403
  - lib/nokogiri/xml.rb
@@ -443,7 +444,6 @@ files:
443
444
  - patches/libxml2/0002-Remove-script-macro-support.patch
444
445
  - patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch
445
446
  - patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch
446
- - patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch
447
447
  - ports/archives/libxml2-2.9.10.tar.gz
448
448
  - ports/archives/libxslt-1.1.34.tar.gz
449
449
  homepage: https://nokogiri.org
@@ -465,14 +465,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
465
465
  requirements:
466
466
  - - ">="
467
467
  - !ruby/object:Gem::Version
468
- version: 2.3.0
468
+ version: 2.4.0
469
469
  required_rubygems_version: !ruby/object:Gem::Requirement
470
470
  requirements:
471
- - - ">="
471
+ - - ">"
472
472
  - !ruby/object:Gem::Version
473
- version: '0'
473
+ version: 1.3.1
474
474
  requirements: []
475
- rubygems_version: 3.0.8
475
+ rubygems_version: 3.1.2
476
476
  signing_key:
477
477
  specification_version: 4
478
478
  summary: Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
@@ -1,32 +0,0 @@
1
- From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001
2
- From: Zhipeng Xie <xiezhipeng1@huawei.com>
3
- Date: Thu, 12 Dec 2019 17:30:55 +0800
4
- Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities
5
-
6
- When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef
7
- return NULL which cause a infinite loop in xmlStringLenDecodeEntities
8
-
9
- Found with libFuzzer.
10
-
11
- Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
12
- ---
13
- parser.c | 3 ++-
14
- 1 file changed, 2 insertions(+), 1 deletion(-)
15
-
16
- diff --git a/parser.c b/parser.c
17
- index d1c3196..a34bb6c 100644
18
- --- a/parser.c
19
- +++ b/parser.c
20
- @@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
21
- else
22
- c = 0;
23
- while ((c != 0) && (c != end) && /* non input consuming loop */
24
- - (c != end2) && (c != end3)) {
25
- + (c != end2) && (c != end3) &&
26
- + (ctxt->instate != XML_PARSER_EOF)) {
27
-
28
- if (c == 0) break;
29
- if ((c == '&') && (str[1] == '#')) {
30
- --
31
- 2.17.1
32
-