nori 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.1.4 (2013-01-10)
2
+
3
+ * Fix for remote code execution bug. For more in-depth information, read about the
4
+ recent [Rails hotfix](https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/61bkgvnSGTQ).
5
+ Please make sure to upgrade now!
6
+
1
7
  ## 1.1.3 (2012-07-12)
2
8
 
3
9
  * Fix: Merged [pull request 21](https://github.com/rubiii/nori/pull/21) to fix an
@@ -77,7 +83,7 @@
77
83
 
78
84
  ## 0.2.1 (2011-05-15)
79
85
 
80
- * Fix: Changed XML attributes converted to Hash keys to be prefixed with an @-sign.
86
+ * Fix: Changed XML attributes converted to Hash keys to be prefixed with an @-sign.
81
87
  This avoids problems with attributes and child nodes having the same name.
82
88
 
83
89
  <multiRef id="id1">
data/lib/nori/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Nori
2
2
 
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
 
5
5
  end
@@ -77,9 +77,7 @@ module Nori
77
77
  self.typecasts["decimal"] = lambda { |v| v.nil? ? nil : BigDecimal(v.to_s) }
78
78
  self.typecasts["double"] = lambda { |v| v.nil? ? nil : v.to_f }
79
79
  self.typecasts["float"] = lambda { |v| v.nil? ? nil : v.to_f }
80
- self.typecasts["symbol"] = lambda { |v| v.nil? ? nil : v.to_sym }
81
80
  self.typecasts["string"] = lambda { |v| v.to_s }
82
- self.typecasts["yaml"] = lambda { |v| v.nil? ? nil : YAML.load(v) }
83
81
  self.typecasts["base64Binary"] = lambda { |v| v.unpack('m').first }
84
82
 
85
83
  self.available_typecasts = self.typecasts.keys
@@ -395,7 +395,8 @@ describe Nori do
395
395
  'approved' => nil,
396
396
  'written_on' => nil,
397
397
  'viewed_at' => nil,
398
- 'content' => nil,
398
+ # don't execute arbitary YAML code
399
+ 'content' => { "@type" => "yaml" },
399
400
  'parent_id' => nil,
400
401
  'nil_true' => nil,
401
402
  'namespaced' => nil
@@ -414,7 +415,7 @@ describe Nori do
414
415
  <replies-close-in type="integer">2592000000</replies-close-in>
415
416
  <written-on type="date">2003-07-16</written-on>
416
417
  <viewed-at type="datetime">2003-07-16T09:28:00+0000</viewed-at>
417
- <content type="yaml">--- \n1: should be an integer\n:message: Have a nice day\narray: \n- should-have-dashes: true\n should_have_underscores: true\n</content>
418
+ <content type="yaml">--- \n1: should be an integer\n:message: Have a nice day\narray: \n- should-have-dashes: true\n should_have_underscores: true</content>
418
419
  <author-email-address>david@loudthinking.com</author-email-address>
419
420
  <parent-id></parent-id>
420
421
  <ad-revenue type="decimal">1.5</ad-revenue>
@@ -435,12 +436,13 @@ describe Nori do
435
436
  # Changed this line where the key is :message. The yaml specifies this as a symbol, and who am I to change what you specify
436
437
  # The line in ActiveSupport is
437
438
  # 'content' => { 'message' => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] },
438
- 'content' => { :message => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] },
439
+ 'content' => "--- \n1: should be an integer\n:message: Have a nice day\narray: \n- should-have-dashes: true\n should_have_underscores: true",
439
440
  'author_email_address' => "david@loudthinking.com",
440
441
  'parent_id' => nil,
441
442
  'ad_revenue' => BigDecimal("1.50"),
442
443
  'optimum_viewing_angle' => 135.0,
443
- 'resident' => :yes
444
+ # don't create symbols from arbitary remote code
445
+ 'resident' => "yes"
444
446
  }
445
447
 
446
448
  parse(topic_xml)["topic"].each do |k,v|
metadata CHANGED
@@ -1,95 +1,88 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: nori
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.4
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 3
10
- version: 1.1.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Daniel Harrington
14
9
  - John Nunemaker
15
10
  - Wynn Netherland
16
11
  autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
-
20
- date: 2012-07-12 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- version_requirements: &id001 !ruby/object:Gem::Requirement
14
+ date: 2013-01-10 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: rake
18
+ requirement: !ruby/object:Gem::Requirement
24
19
  none: false
25
- requirements:
20
+ requirements:
26
21
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 49
29
- segments:
30
- - 0
31
- - 8
32
- - 7
22
+ - !ruby/object:Gem::Version
33
23
  version: 0.8.7
34
- name: rake
35
24
  type: :development
36
25
  prerelease: false
37
- requirement: *id001
38
- - !ruby/object:Gem::Dependency
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
26
+ version_requirements: !ruby/object:Gem::Requirement
40
27
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 7
45
- segments:
46
- - 1
47
- - 4
48
- - 0
49
- version: 1.4.0
28
+ requirements:
29
+ - - ~>
30
+ - !ruby/object:Gem::Version
31
+ version: 0.8.7
32
+ - !ruby/object:Gem::Dependency
50
33
  name: nokogiri
34
+ requirement: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
39
+ version: 1.4.0
51
40
  type: :development
52
41
  prerelease: false
53
- requirement: *id002
54
- - !ruby/object:Gem::Dependency
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
42
+ version_requirements: !ruby/object:Gem::Requirement
56
43
  none: false
57
- requirements:
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: 1.4.0
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec
50
+ requirement: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
58
53
  - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 27
61
- segments:
62
- - 2
63
- - 5
64
- - 0
54
+ - !ruby/object:Gem::Version
65
55
  version: 2.5.0
66
- name: rspec
67
56
  type: :development
68
57
  prerelease: false
69
- requirement: *id003
70
- - !ruby/object:Gem::Dependency
71
- version_requirements: &id004 !ruby/object:Gem::Requirement
58
+ version_requirements: !ruby/object:Gem::Requirement
72
59
  none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
- version: "0"
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ version: 2.5.0
64
+ - !ruby/object:Gem::Dependency
80
65
  name: autotest
66
+ requirement: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
81
72
  type: :development
82
73
  prerelease: false
83
- requirement: *id004
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
84
80
  description: XML to Hash translator
85
81
  email: me@rubiii.com
86
82
  executables: []
87
-
88
83
  extensions: []
89
-
90
84
  extra_rdoc_files: []
91
-
92
- files:
85
+ files:
93
86
  - .gitignore
94
87
  - .rspec
95
88
  - .travis.yml
@@ -121,38 +114,35 @@ files:
121
114
  - spec/spec_helper.rb
122
115
  homepage: http://github.com/rubiii/nori
123
116
  licenses: []
124
-
125
117
  post_install_message:
126
118
  rdoc_options: []
127
-
128
- require_paths:
119
+ require_paths:
129
120
  - lib
130
- required_ruby_version: !ruby/object:Gem::Requirement
121
+ required_ruby_version: !ruby/object:Gem::Requirement
131
122
  none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- hash: 3
136
- segments:
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ segments:
137
128
  - 0
138
- version: "0"
139
- required_rubygems_version: !ruby/object:Gem::Requirement
129
+ hash: -4605903016342497062
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
131
  none: false
141
- requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- hash: 3
145
- segments:
132
+ requirements:
133
+ - - ! '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ segments:
146
137
  - 0
147
- version: "0"
138
+ hash: -4605903016342497062
148
139
  requirements: []
149
-
150
140
  rubyforge_project: nori
151
- rubygems_version: 1.8.21
141
+ rubygems_version: 1.8.24
152
142
  signing_key:
153
143
  specification_version: 3
154
144
  summary: XML to Hash translator
155
- test_files:
145
+ test_files:
156
146
  - spec/nori/core_ext/hash_spec.rb
157
147
  - spec/nori/core_ext/object_spec.rb
158
148
  - spec/nori/core_ext/string_spec.rb