nokogiri 1.6.2.1-x86-mingw32 → 1.6.3.rc1-x86-mingw32

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f4d1d991f8b668a5eb21c477ed14f5fe116b195
4
- data.tar.gz: 7eba13583c2d40dfe9475e109ea26a552bb071da
3
+ metadata.gz: 0236e503ac3fae3e1f001c995d1b8bb3d56af09d
4
+ data.tar.gz: 7f6a1882b10c5cc3345bf4cd5484f8c234a88550
5
5
  SHA512:
6
- metadata.gz: 895e8edb268152e71541cd639d481600488612ce268d279f0dff84c8e85e345db616ce7067a641fc7435869905b06875369838668f97aee50d9d5d6932a4ea11
7
- data.tar.gz: 782610000a02aa7ac76473fb3b81ea23ae0edbcdf024651b7377e2cef7019e610967486095a1499a9bd1ca6339fd353b5ac594c317f5add3c4f42e5ee8294120
6
+ metadata.gz: 82da8e07b2f0d799c271c5e9326a190e6c8517cde88cebecdcef5a152f7f95cd188355f81a270744c0d0ecd46a5983e9a88ed1f853bb4377cbb7773d6c0ce850
7
+ data.tar.gz: c7b08fa4fe1dc952ce1f88b416bc24ca3bca642cc5153ff5432a3c84a735112f1b9d53d1e5ad3ef99d909c365cc046960beb86592b3885827745de599917e293
@@ -1,9 +1,18 @@
1
- === 1.6.2.1
1
+ === 1.6.3 / unreleased
2
2
 
3
- ==== Bugの修正
3
+ ==== Bug fixes
4
+
5
+ * Fix JRuby memory exhaustion vulnerability. #1087 (Thanks, @ocher!)
6
+ * Fix segfault during GC when using `libxml-ruby` and `nokogiri` together in multi-threaded environment. #895 (Thanks, @ender672!)
7
+
8
+
9
+ === 1.6.2.1 / 2014年5月13日
10
+
11
+ ==== バグ修正
4
12
 
5
13
  * Fix statically-linked libxml2 installation when using universal builds of Ruby. #1104
6
14
  * Patching `mini_portile` to address the git dependency detailed in #1102.
15
+ * Library load fix to address segfault reported on some systems. #1097
7
16
 
8
17
 
9
18
  === 1.6.2 / 2014年5月12日
@@ -1,9 +1,18 @@
1
- === 1.6.2.1
1
+ === 1.6.3 / unreleased
2
2
 
3
- ==== Bug fix
3
+ ==== Bug fixes
4
+
5
+ * Fix JRuby memory exhaustion vulnerability. #1087 (Thanks, @ocher)
6
+ * Fix segfault during GC when using `libxml-ruby` and `nokogiri` together in multi-threaded environment. #895 (Thanks, @ender672!)
7
+
8
+
9
+ === 1.6.2.1 / 2014-05-13
10
+
11
+ ==== Bug fixes
4
12
 
5
13
  * Fix statically-linked libxml2 installation when using universal builds of Ruby. #1104
6
14
  * Patching `mini_portile` to address the git dependency detailed in #1102.
15
+ * Library load fix to address segfault reported on some systems. #1097
7
16
 
8
17
 
9
18
  === 1.6.2 / 2014-05-12
@@ -17,13 +17,29 @@ static int dealloc_node_i(xmlNodePtr key, xmlNodePtr node, xmlDocPtr doc)
17
17
  return ST_CONTINUE;
18
18
  }
19
19
 
20
+ static void remove_private(xmlNodePtr node)
21
+ {
22
+ xmlNodePtr child;
23
+
24
+ for (child = node->children; child; child = child->next)
25
+ remove_private(child);
26
+
27
+ if ((node->type == XML_ELEMENT_NODE ||
28
+ node->type == XML_XINCLUDE_START ||
29
+ node->type == XML_XINCLUDE_END) &&
30
+ node->properties) {
31
+ for (child = (xmlNodePtr)node->properties; child; child = child->next)
32
+ remove_private(child);
33
+ }
34
+
35
+ node->_private = NULL;
36
+ }
37
+
20
38
  static void dealloc(xmlDocPtr doc)
21
39
  {
22
- xmlDeregisterNodeFunc func;
23
40
  st_table *node_hash;
24
41
 
25
42
  NOKOGIRI_DEBUG_START(doc);
26
- func = xmlDeregisterNodeDefault(NULL);
27
43
 
28
44
  node_hash = DOC_UNLINKED_NODE_HASH(doc);
29
45
 
@@ -31,10 +47,17 @@ static void dealloc(xmlDocPtr doc)
31
47
  st_free_table(node_hash);
32
48
 
33
49
  free(doc->_private);
34
- doc->_private = NULL;
50
+
51
+ /* When both Nokogiri and libxml-ruby are loaded, make sure that all nodes
52
+ * have their _private pointers cleared. This is to avoid libxml-ruby's
53
+ * xmlDeregisterNode callback from accessing VALUE pointers from ruby's GC
54
+ * free context, which can result in segfaults.
55
+ */
56
+ if (xmlDeregisterNodeDefaultValue)
57
+ remove_private((xmlNodePtr)doc);
58
+
35
59
  xmlFreeDoc(doc);
36
60
 
37
- xmlDeregisterNodeDefault(func);
38
61
  NOKOGIRI_DEBUG_END(doc);
39
62
  }
40
63
 
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  module Nokogiri
2
2
  # The version of Nokogiri you are using
3
- VERSION = '1.6.2.1'
3
+ VERSION = '1.6.3.rc1'
4
4
 
5
5
  class VersionInfo # :nodoc:
6
6
  def jruby?
@@ -625,6 +625,12 @@ module Nokogiri
625
625
  refute_empty doc.errors
626
626
  end
627
627
 
628
+ def test_memory_explosion_on_wrong_formatted_element_following_the_root_element
629
+ doc = Nokogiri::XML("<a/><\n")
630
+ refute_nil doc
631
+ refute_empty doc.errors
632
+ end
633
+
628
634
  def test_document_has_errors
629
635
  doc = Nokogiri::XML(<<-eoxml)
630
636
  <foo><bar></foo>
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.6.2.1
4
+ version: 1.6.3.rc1
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Aaron Patterson
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-05-14 00:00:00.000000000 Z
15
+ date: 2014-05-22 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: mini_portile
@@ -526,9 +526,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
526
526
  version: 1.9.2
527
527
  required_rubygems_version: !ruby/object:Gem::Requirement
528
528
  requirements:
529
- - - '>='
529
+ - - '>'
530
530
  - !ruby/object:Gem::Version
531
- version: '0'
531
+ version: 1.3.1
532
532
  requirements: []
533
533
  rubyforge_project: nokogiri
534
534
  rubygems_version: 2.2.2