activerecord 4.0.2 → 4.0.3

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc74a2593fb6cc4a95438536b2b4e118778d4f3b
4
- data.tar.gz: 3b17d737b87ec85132bf0fc5ce145c53fad65438
3
+ metadata.gz: 6db6e96ad6545b979c2f76d92bce1f6062e5f3b7
4
+ data.tar.gz: d8195989b1dc14af19653ff60158301d1bacb0d9
5
5
  SHA512:
6
- metadata.gz: 9f924a16123ae4b161d2664b050e14d435b011f0ba8dc6951aa564f5e379676f06ec08468edfdf34025f8607aaf0d41e4d4bb6c24304ce0b0ebb468b271aa77f
7
- data.tar.gz: 831409dfd793544efc397938e886d62daa9317814d6da28f5218b71c25f128e216301e65e449ed103ac4d7660341ebef4983bd715484d84c610afa47bc303d06
6
+ metadata.gz: ac29a96f859a590c33dfdcd670342b133a4871f1db0b19c5d3c31b6fe0ca3e54b97aef90995a0b8d32e71028bcdfb1abdeb4b2d3a5ae8af94eeb6c80ab127424
7
+ data.tar.gz: 11b902aa9480022875b6e268f7819b5af03e8fa99009d342aa1348924bfaf829f730cd916330c0e5e707c4cd478f841ef56a75093b8c020d829c90d2b60b1381
@@ -1,3 +1,13 @@
1
+ * Correctly escape PostgreSQL arrays.
2
+
3
+ Fixes: CVE-2014-0080
4
+
5
+
6
+ ## Rails 4.0.2 (December 02, 2013) ##
7
+
8
+ *No changes*
9
+
10
+
1
11
  ## Rails 4.0.1 (November 01, 2013) ##
2
12
 
3
13
  * `NullRelation#pluck` takes a list of columns
@@ -138,12 +138,16 @@ module ActiveRecord
138
138
  end
139
139
  end
140
140
 
141
+ ARRAY_ESCAPE = "\\" * 2 * 2 # escape the backslash twice for PG arrays
142
+
141
143
  def quote_and_escape(value)
142
144
  case value
143
145
  when "NULL"
144
146
  value
145
147
  else
146
- "\"#{value.gsub(/"/,"\\\"")}\""
148
+ value = value.gsub(/\\/, ARRAY_ESCAPE)
149
+ value.gsub!(/"/,"\\\"")
150
+ "\"#{value}\""
147
151
  end
148
152
  end
149
153
  end
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  # Returns the version of the currently loaded ActiveRecord as a Gem::Version
3
3
  def self.version
4
- Gem::Version.new "4.0.2"
4
+ Gem::Version.new "4.0.3"
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-03 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.2
19
+ version: 4.0.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.2
26
+ version: 4.0.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.0.2
33
+ version: 4.0.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.0.2
40
+ version: 4.0.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,8 +80,10 @@ files:
80
80
  - README.rdoc
81
81
  - examples/performance.rb
82
82
  - examples/simple.rb
83
+ - lib/active_record.rb
83
84
  - lib/active_record/aggregations.rb
84
85
  - lib/active_record/association_relation.rb
86
+ - lib/active_record/associations.rb
85
87
  - lib/active_record/associations/alias_tracker.rb
86
88
  - lib/active_record/associations/association.rb
87
89
  - lib/active_record/associations/association_scope.rb
@@ -101,11 +103,12 @@ files:
101
103
  - lib/active_record/associations/has_many_through_association.rb
102
104
  - lib/active_record/associations/has_one_association.rb
103
105
  - lib/active_record/associations/has_one_through_association.rb
106
+ - lib/active_record/associations/join_dependency.rb
104
107
  - lib/active_record/associations/join_dependency/join_association.rb
105
108
  - lib/active_record/associations/join_dependency/join_base.rb
106
109
  - lib/active_record/associations/join_dependency/join_part.rb
107
- - lib/active_record/associations/join_dependency.rb
108
110
  - lib/active_record/associations/join_helper.rb
111
+ - lib/active_record/associations/preloader.rb
109
112
  - lib/active_record/associations/preloader/association.rb
110
113
  - lib/active_record/associations/preloader/belongs_to.rb
111
114
  - lib/active_record/associations/preloader/collection_association.rb
@@ -116,11 +119,10 @@ files:
116
119
  - lib/active_record/associations/preloader/has_one_through.rb
117
120
  - lib/active_record/associations/preloader/singular_association.rb
118
121
  - lib/active_record/associations/preloader/through_association.rb
119
- - lib/active_record/associations/preloader.rb
120
122
  - lib/active_record/associations/singular_association.rb
121
123
  - lib/active_record/associations/through_association.rb
122
- - lib/active_record/associations.rb
123
124
  - lib/active_record/attribute_assignment.rb
125
+ - lib/active_record/attribute_methods.rb
124
126
  - lib/active_record/attribute_methods/before_type_cast.rb
125
127
  - lib/active_record/attribute_methods/dirty.rb
126
128
  - lib/active_record/attribute_methods/primary_key.rb
@@ -129,7 +131,6 @@ files:
129
131
  - lib/active_record/attribute_methods/serialization.rb
130
132
  - lib/active_record/attribute_methods/time_zone_conversion.rb
131
133
  - lib/active_record/attribute_methods/write.rb
132
- - lib/active_record/attribute_methods.rb
133
134
  - lib/active_record/autosave_association.rb
134
135
  - lib/active_record/base.rb
135
136
  - lib/active_record/callbacks.rb
@@ -176,9 +177,9 @@ files:
176
177
  - lib/active_record/locking/optimistic.rb
177
178
  - lib/active_record/locking/pessimistic.rb
178
179
  - lib/active_record/log_subscriber.rb
180
+ - lib/active_record/migration.rb
179
181
  - lib/active_record/migration/command_recorder.rb
180
182
  - lib/active_record/migration/join_table.rb
181
- - lib/active_record/migration.rb
182
183
  - lib/active_record/model_schema.rb
183
184
  - lib/active_record/nested_attributes.rb
184
185
  - lib/active_record/null_relation.rb
@@ -192,6 +193,7 @@ files:
192
193
  - lib/active_record/railties/jdbcmysql_error.rb
193
194
  - lib/active_record/readonly_attributes.rb
194
195
  - lib/active_record/reflection.rb
196
+ - lib/active_record/relation.rb
195
197
  - lib/active_record/relation/batches.rb
196
198
  - lib/active_record/relation/calculations.rb
197
199
  - lib/active_record/relation/delegation.rb
@@ -200,16 +202,15 @@ files:
200
202
  - lib/active_record/relation/predicate_builder.rb
201
203
  - lib/active_record/relation/query_methods.rb
202
204
  - lib/active_record/relation/spawn_methods.rb
203
- - lib/active_record/relation.rb
204
205
  - lib/active_record/result.rb
205
206
  - lib/active_record/runtime_registry.rb
206
207
  - lib/active_record/sanitization.rb
207
208
  - lib/active_record/schema.rb
208
209
  - lib/active_record/schema_dumper.rb
209
210
  - lib/active_record/schema_migration.rb
211
+ - lib/active_record/scoping.rb
210
212
  - lib/active_record/scoping/default.rb
211
213
  - lib/active_record/scoping/named.rb
212
- - lib/active_record/scoping.rb
213
214
  - lib/active_record/serialization.rb
214
215
  - lib/active_record/serializers/xml_serializer.rb
215
216
  - lib/active_record/statement_cache.rb
@@ -225,19 +226,18 @@ files:
225
226
  - lib/active_record/timestamp.rb
226
227
  - lib/active_record/transactions.rb
227
228
  - lib/active_record/translation.rb
229
+ - lib/active_record/validations.rb
228
230
  - lib/active_record/validations/associated.rb
229
231
  - lib/active_record/validations/presence.rb
230
232
  - lib/active_record/validations/uniqueness.rb
231
- - lib/active_record/validations.rb
232
233
  - lib/active_record/version.rb
233
- - lib/active_record.rb
234
+ - lib/rails/generators/active_record.rb
234
235
  - lib/rails/generators/active_record/migration/migration_generator.rb
235
236
  - lib/rails/generators/active_record/migration/templates/create_table_migration.rb
236
237
  - lib/rails/generators/active_record/migration/templates/migration.rb
237
238
  - lib/rails/generators/active_record/model/model_generator.rb
238
239
  - lib/rails/generators/active_record/model/templates/model.rb
239
240
  - lib/rails/generators/active_record/model/templates/module.rb
240
- - lib/rails/generators/active_record.rb
241
241
  homepage: http://www.rubyonrails.org
242
242
  licenses:
243
243
  - MIT
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  version: '0'
261
261
  requirements: []
262
262
  rubyforge_project:
263
- rubygems_version: 2.0.2
263
+ rubygems_version: 2.2.0
264
264
  signing_key:
265
265
  specification_version: 4
266
266
  summary: Object-relational mapper framework (part of Rails).