activerecord 4.1.0.beta1 → 4.1.0.beta2

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: 47c969d242da2dd41909dde035519bda9ae052d2
4
- data.tar.gz: 161da4cf5078bc21183602281a927fcfc037ed1c
3
+ metadata.gz: 93b5597ffd63ba0a54e42252678f44d1081cdfd9
4
+ data.tar.gz: 3edb05e2df739c238a64321362241f7b2721ad07
5
5
  SHA512:
6
- metadata.gz: 33a8969b0e64f955f5c799331daf6d559c22282d0e1bde5032aed25466ca52afb0cb5438704692bbbe520e5f3a4a5ff02475963c8b81905590cc82084489edbe
7
- data.tar.gz: 72d64ad26ffde56d6e58c609a97bf1dca7a8cc32278f1e2610138754821805b0b04483111053202b57151881318715ddd8becf34ba75eef7ac108ba3d917cd2e
6
+ metadata.gz: 69f87e042603602b8bcdf18bee381d7bef2b80b2db18930620f450e57df98a01d7b4c26ef94a0e6923466f589024f2f2a9a8a1ea2eec194caf6fb46804974805
7
+ data.tar.gz: 65c4c0941f44ab6ff1d9cb21b2b612a3b89a258afd1e288bb519880bdfce011a3f481f903537dc8141c5c7e776ecc889e9a485d9dceabc31b2cb1272fd426d8e
@@ -1,3 +1,7 @@
1
+ * Correctly escape PostgreSQL arrays.
2
+
3
+ Fixes: CVE-2014-0080
4
+
1
5
  * `Relation` no longer has mutator methods like `#map!` and `#delete_if`. Convert
2
6
  to an `Array` by calling `#to_a` before using these methods.
3
7
 
@@ -142,12 +142,16 @@ module ActiveRecord
142
142
  end
143
143
  end
144
144
 
145
+ ARRAY_ESCAPE = "\\" * 2 * 2 # escape the backslash twice for PG arrays
146
+
145
147
  def quote_and_escape(value)
146
148
  case value
147
149
  when "NULL"
148
150
  value
149
151
  else
150
- "\"#{value.gsub(/"/,"\\\"")}\""
152
+ value = value.gsub(/\\/, ARRAY_ESCAPE)
153
+ value.gsub!(/"/,"\\\"")
154
+ "\"#{value}\""
151
155
  end
152
156
  end
153
157
 
@@ -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.1.0.beta1"
4
+ Gem::Version.new "4.1.0.beta2"
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.1.0.beta1
4
+ version: 4.1.0.beta2
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-18 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,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.0.beta1
19
+ version: 4.1.0.beta2
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.1.0.beta1
26
+ version: 4.1.0.beta2
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.1.0.beta1
33
+ version: 4.1.0.beta2
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.1.0.beta1
40
+ version: 4.1.0.beta2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: arel
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 5.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 5.0.0
55
55
  description: Databases on Rails. Build a persistent domain model by mapping database
@@ -66,8 +66,10 @@ files:
66
66
  - README.rdoc
67
67
  - examples/performance.rb
68
68
  - examples/simple.rb
69
+ - lib/active_record.rb
69
70
  - lib/active_record/aggregations.rb
70
71
  - lib/active_record/association_relation.rb
72
+ - lib/active_record/associations.rb
71
73
  - lib/active_record/associations/alias_tracker.rb
72
74
  - lib/active_record/associations/association.rb
73
75
  - lib/active_record/associations/association_scope.rb
@@ -86,11 +88,12 @@ files:
86
88
  - lib/active_record/associations/has_many_through_association.rb
87
89
  - lib/active_record/associations/has_one_association.rb
88
90
  - lib/active_record/associations/has_one_through_association.rb
91
+ - lib/active_record/associations/join_dependency.rb
89
92
  - lib/active_record/associations/join_dependency/join_association.rb
90
93
  - lib/active_record/associations/join_dependency/join_base.rb
91
94
  - lib/active_record/associations/join_dependency/join_part.rb
92
- - lib/active_record/associations/join_dependency.rb
93
95
  - lib/active_record/associations/join_helper.rb
96
+ - lib/active_record/associations/preloader.rb
94
97
  - lib/active_record/associations/preloader/association.rb
95
98
  - lib/active_record/associations/preloader/belongs_to.rb
96
99
  - lib/active_record/associations/preloader/collection_association.rb
@@ -100,11 +103,10 @@ files:
100
103
  - lib/active_record/associations/preloader/has_one_through.rb
101
104
  - lib/active_record/associations/preloader/singular_association.rb
102
105
  - lib/active_record/associations/preloader/through_association.rb
103
- - lib/active_record/associations/preloader.rb
104
106
  - lib/active_record/associations/singular_association.rb
105
107
  - lib/active_record/associations/through_association.rb
106
- - lib/active_record/associations.rb
107
108
  - lib/active_record/attribute_assignment.rb
109
+ - lib/active_record/attribute_methods.rb
108
110
  - lib/active_record/attribute_methods/before_type_cast.rb
109
111
  - lib/active_record/attribute_methods/dirty.rb
110
112
  - lib/active_record/attribute_methods/primary_key.rb
@@ -113,7 +115,6 @@ files:
113
115
  - lib/active_record/attribute_methods/serialization.rb
114
116
  - lib/active_record/attribute_methods/time_zone_conversion.rb
115
117
  - lib/active_record/attribute_methods/write.rb
116
- - lib/active_record/attribute_methods.rb
117
118
  - lib/active_record/autosave_association.rb
118
119
  - lib/active_record/base.rb
119
120
  - lib/active_record/callbacks.rb
@@ -163,9 +164,9 @@ files:
163
164
  - lib/active_record/locking/optimistic.rb
164
165
  - lib/active_record/locking/pessimistic.rb
165
166
  - lib/active_record/log_subscriber.rb
167
+ - lib/active_record/migration.rb
166
168
  - lib/active_record/migration/command_recorder.rb
167
169
  - lib/active_record/migration/join_table.rb
168
- - lib/active_record/migration.rb
169
170
  - lib/active_record/model_schema.rb
170
171
  - lib/active_record/nested_attributes.rb
171
172
  - lib/active_record/no_touching.rb
@@ -180,26 +181,26 @@ files:
180
181
  - lib/active_record/railties/jdbcmysql_error.rb
181
182
  - lib/active_record/readonly_attributes.rb
182
183
  - lib/active_record/reflection.rb
184
+ - lib/active_record/relation.rb
183
185
  - lib/active_record/relation/batches.rb
184
186
  - lib/active_record/relation/calculations.rb
185
187
  - lib/active_record/relation/delegation.rb
186
188
  - lib/active_record/relation/finder_methods.rb
187
189
  - lib/active_record/relation/merger.rb
190
+ - lib/active_record/relation/predicate_builder.rb
188
191
  - lib/active_record/relation/predicate_builder/array_handler.rb
189
192
  - lib/active_record/relation/predicate_builder/relation_handler.rb
190
- - lib/active_record/relation/predicate_builder.rb
191
193
  - lib/active_record/relation/query_methods.rb
192
194
  - lib/active_record/relation/spawn_methods.rb
193
- - lib/active_record/relation.rb
194
195
  - lib/active_record/result.rb
195
196
  - lib/active_record/runtime_registry.rb
196
197
  - lib/active_record/sanitization.rb
197
198
  - lib/active_record/schema.rb
198
199
  - lib/active_record/schema_dumper.rb
199
200
  - lib/active_record/schema_migration.rb
201
+ - lib/active_record/scoping.rb
200
202
  - lib/active_record/scoping/default.rb
201
203
  - lib/active_record/scoping/named.rb
202
- - lib/active_record/scoping.rb
203
204
  - lib/active_record/serialization.rb
204
205
  - lib/active_record/serializers/xml_serializer.rb
205
206
  - lib/active_record/statement_cache.rb
@@ -211,43 +212,42 @@ files:
211
212
  - lib/active_record/timestamp.rb
212
213
  - lib/active_record/transactions.rb
213
214
  - lib/active_record/translation.rb
215
+ - lib/active_record/validations.rb
214
216
  - lib/active_record/validations/associated.rb
215
217
  - lib/active_record/validations/presence.rb
216
218
  - lib/active_record/validations/uniqueness.rb
217
- - lib/active_record/validations.rb
218
219
  - lib/active_record/version.rb
219
- - lib/active_record.rb
220
+ - lib/rails/generators/active_record.rb
221
+ - lib/rails/generators/active_record/migration.rb
220
222
  - lib/rails/generators/active_record/migration/migration_generator.rb
221
223
  - lib/rails/generators/active_record/migration/templates/create_table_migration.rb
222
224
  - lib/rails/generators/active_record/migration/templates/migration.rb
223
- - lib/rails/generators/active_record/migration.rb
224
225
  - lib/rails/generators/active_record/model/model_generator.rb
225
226
  - lib/rails/generators/active_record/model/templates/model.rb
226
227
  - lib/rails/generators/active_record/model/templates/module.rb
227
- - lib/rails/generators/active_record.rb
228
228
  homepage: http://www.rubyonrails.org
229
229
  licenses:
230
230
  - MIT
231
231
  metadata: {}
232
232
  post_install_message:
233
233
  rdoc_options:
234
- - --main
234
+ - "--main"
235
235
  - README.rdoc
236
236
  require_paths:
237
237
  - lib
238
238
  required_ruby_version: !ruby/object:Gem::Requirement
239
239
  requirements:
240
- - - '>='
240
+ - - ">="
241
241
  - !ruby/object:Gem::Version
242
242
  version: 1.9.3
243
243
  required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  requirements:
245
- - - '>'
245
+ - - ">"
246
246
  - !ruby/object:Gem::Version
247
247
  version: 1.3.1
248
248
  requirements: []
249
249
  rubyforge_project:
250
- rubygems_version: 2.1.11
250
+ rubygems_version: 2.2.0
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Object-relational mapper framework (part of Rails).