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.
- checksums.yaml +4 -4
- data/README.md +19 -17
- data/ext/nokogiri/extconf.rb +44 -35
- data/ext/nokogiri/nokogiri.c +12 -6
- data/ext/nokogiri/nokogiri.h +1 -0
- data/ext/nokogiri/xml_document.c +10 -1
- data/ext/nokogiri/xml_node.c +20 -0
- data/ext/nokogiri/xml_schema.c +0 -29
- data/ext/nokogiri/xslt_stylesheet.c +0 -4
- data/lib/nokogiri.rb +2 -19
- data/lib/nokogiri/css.rb +1 -0
- data/lib/nokogiri/css/node.rb +1 -0
- data/lib/nokogiri/css/parser.rb +1 -0
- data/lib/nokogiri/css/parser_extras.rb +1 -0
- data/lib/nokogiri/css/syntax_error.rb +1 -0
- data/lib/nokogiri/css/tokenizer.rb +1 -0
- data/lib/nokogiri/css/xpath_visitor.rb +3 -1
- data/lib/nokogiri/decorators/slop.rb +1 -0
- data/lib/nokogiri/html.rb +1 -0
- data/lib/nokogiri/html/builder.rb +1 -0
- data/lib/nokogiri/html/document.rb +1 -0
- data/lib/nokogiri/html/document_fragment.rb +1 -0
- data/lib/nokogiri/html/element_description.rb +1 -0
- data/lib/nokogiri/html/element_description_defaults.rb +1 -0
- data/lib/nokogiri/html/entity_lookup.rb +1 -0
- data/lib/nokogiri/html/sax/parser.rb +1 -0
- data/lib/nokogiri/html/sax/parser_context.rb +1 -0
- data/lib/nokogiri/html/sax/push_parser.rb +1 -0
- data/lib/nokogiri/jruby/dependencies.rb +20 -0
- data/lib/nokogiri/syntax_error.rb +1 -0
- data/lib/nokogiri/version.rb +85 -45
- data/lib/nokogiri/xml.rb +1 -0
- data/lib/nokogiri/xml/attr.rb +1 -0
- data/lib/nokogiri/xml/attribute_decl.rb +1 -0
- data/lib/nokogiri/xml/builder.rb +1 -0
- data/lib/nokogiri/xml/cdata.rb +1 -0
- data/lib/nokogiri/xml/character_data.rb +1 -0
- data/lib/nokogiri/xml/document.rb +3 -8
- data/lib/nokogiri/xml/document_fragment.rb +1 -0
- data/lib/nokogiri/xml/dtd.rb +1 -0
- data/lib/nokogiri/xml/element_content.rb +1 -0
- data/lib/nokogiri/xml/element_decl.rb +1 -0
- data/lib/nokogiri/xml/entity_decl.rb +1 -0
- data/lib/nokogiri/xml/entity_reference.rb +1 -0
- data/lib/nokogiri/xml/namespace.rb +1 -0
- data/lib/nokogiri/xml/node.rb +26 -12
- data/lib/nokogiri/xml/node/save_options.rb +1 -0
- data/lib/nokogiri/xml/node_set.rb +1 -0
- data/lib/nokogiri/xml/notation.rb +1 -0
- data/lib/nokogiri/xml/parse_options.rb +4 -3
- data/lib/nokogiri/xml/pp.rb +1 -0
- data/lib/nokogiri/xml/pp/character_data.rb +1 -0
- data/lib/nokogiri/xml/pp/node.rb +1 -0
- data/lib/nokogiri/xml/processing_instruction.rb +1 -0
- data/lib/nokogiri/xml/reader.rb +7 -3
- data/lib/nokogiri/xml/relax_ng.rb +1 -0
- data/lib/nokogiri/xml/sax.rb +1 -0
- data/lib/nokogiri/xml/sax/document.rb +1 -0
- data/lib/nokogiri/xml/sax/parser.rb +1 -0
- data/lib/nokogiri/xml/sax/parser_context.rb +1 -0
- data/lib/nokogiri/xml/sax/push_parser.rb +1 -0
- data/lib/nokogiri/xml/schema.rb +1 -0
- data/lib/nokogiri/xml/searchable.rb +1 -0
- data/lib/nokogiri/xml/syntax_error.rb +1 -0
- data/lib/nokogiri/xml/text.rb +1 -0
- data/lib/nokogiri/xml/xpath.rb +1 -0
- data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -0
- data/lib/nokogiri/xml/xpath_context.rb +1 -0
- data/lib/nokogiri/xslt.rb +1 -0
- data/lib/nokogiri/xslt/stylesheet.rb +1 -0
- data/lib/xsd/xmlparser/nokogiri.rb +1 -0
- metadata +27 -27
- data/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch +0 -32
data/lib/nokogiri/xml/pp.rb
CHANGED
data/lib/nokogiri/xml/pp/node.rb
CHANGED
data/lib/nokogiri/xml/reader.rb
CHANGED
@@ -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
|
-
|
91
|
-
|
92
|
-
|
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
|
###
|
data/lib/nokogiri/xml/sax.rb
CHANGED
data/lib/nokogiri/xml/schema.rb
CHANGED
data/lib/nokogiri/xml/text.rb
CHANGED
data/lib/nokogiri/xml/xpath.rb
CHANGED
data/lib/nokogiri/xslt.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
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: '
|
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: '
|
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
|
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
|
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.
|
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:
|
473
|
+
version: 1.3.1
|
474
474
|
requirements: []
|
475
|
-
rubygems_version: 3.
|
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
|
-
|