activerecord 6.0.6 → 6.0.6.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62b3dcd186d829531c34dec576e3fd66b4cccb2406fe1e0f8acad98a98e60ba6
|
4
|
+
data.tar.gz: 36d39bff0326c50ab47c2f2b36626bce5d670a38c8e6a01a50176ff9f04f74b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c6294d1f7ac84e1c763ba79d91877f64af76daad98a44c820690d4b325efa87a6de87e257c2a9491a5ffcd0b0ce0e4f9ac453df28bdb11b389c4005e73e9139
|
7
|
+
data.tar.gz: b0977e39fb7156f7d3cb9940da3036987fc37d7d813d2c17ec465097dab254231236f5c2fb4854991320a0b6bd624ce860faf2db42dfc45fed20dfb743f0b038
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## Rails 6.0.6.1 (January 17, 2023) ##
|
2
|
+
|
3
|
+
* Make `sanitize_as_sql_comment` more strict
|
4
|
+
|
5
|
+
Though this method was likely never meant to take user input, it was
|
6
|
+
attempting sanitization. That sanitization could be bypassed with
|
7
|
+
carefully crafted input.
|
8
|
+
|
9
|
+
This commit makes the sanitization more robust by replacing any
|
10
|
+
occurrances of "/*" or "*/" with "/ *" or "* /". It also performs a
|
11
|
+
first pass to remove one surrounding comment to avoid compatibility
|
12
|
+
issues for users relying on the existing removal.
|
13
|
+
|
14
|
+
This also clarifies in the documentation of annotate that it should not
|
15
|
+
be provided user input.
|
16
|
+
|
17
|
+
[CVE-2023-22794]
|
18
|
+
|
19
|
+
|
1
20
|
## Rails 6.0.6 (September 09, 2022) ##
|
2
21
|
|
3
22
|
* Symbol is allowed by default for YAML columns
|
@@ -139,7 +139,16 @@ module ActiveRecord
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def sanitize_as_sql_comment(value) # :nodoc:
|
142
|
-
|
142
|
+
# Sanitize a string to appear within a SQL comment
|
143
|
+
# For compatibility, this also surrounding "/*+", "/*", and "*/"
|
144
|
+
# charcacters, possibly with single surrounding space.
|
145
|
+
# Then follows that by replacing any internal "*/" or "/ *" with
|
146
|
+
# "* /" or "/ *"
|
147
|
+
comment = value.to_s.dup
|
148
|
+
comment.gsub!(%r{\A\s*/\*\+?\s?|\s?\*/\s*\Z}, "")
|
149
|
+
comment.gsub!("*/", "* /")
|
150
|
+
comment.gsub!("/*", "/ *")
|
151
|
+
comment
|
143
152
|
end
|
144
153
|
|
145
154
|
def column_name_matcher # :nodoc:
|
@@ -1000,6 +1000,8 @@ module ActiveRecord
|
|
1000
1000
|
# # SELECT "users"."name" FROM "users" /* selecting */ /* user */ /* names */
|
1001
1001
|
#
|
1002
1002
|
# The SQL block comment delimiters, "/*" and "*/", will be added automatically.
|
1003
|
+
#
|
1004
|
+
# Some escaping is performed, however untrusted user input should not be used.
|
1003
1005
|
def annotate(*args)
|
1004
1006
|
check_if_method_has_arguments!(:annotate, args)
|
1005
1007
|
spawn.annotate!(*args)
|
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: 6.0.6
|
4
|
+
version: 6.0.6.1
|
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:
|
11
|
+
date: 2023-01-17 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: 6.0.6
|
19
|
+
version: 6.0.6.1
|
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: 6.0.6
|
26
|
+
version: 6.0.6.1
|
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: 6.0.6
|
33
|
+
version: 6.0.6.1
|
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: 6.0.6
|
40
|
+
version: 6.0.6.1
|
41
41
|
description: Databases on Rails. Build a persistent domain model by mapping database
|
42
42
|
tables to Ruby classes. Strong conventions for associations, validations, aggregations,
|
43
43
|
migrations, and testing come baked-in.
|
@@ -391,10 +391,10 @@ licenses:
|
|
391
391
|
- MIT
|
392
392
|
metadata:
|
393
393
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
394
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.6/activerecord/CHANGELOG.md
|
395
|
-
documentation_uri: https://api.rubyonrails.org/v6.0.6/
|
394
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.6.1/activerecord/CHANGELOG.md
|
395
|
+
documentation_uri: https://api.rubyonrails.org/v6.0.6.1/
|
396
396
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
397
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.6/activerecord
|
397
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.6.1/activerecord
|
398
398
|
rubygems_mfa_required: 'true'
|
399
399
|
post_install_message:
|
400
400
|
rdoc_options:
|
@@ -413,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
413
413
|
- !ruby/object:Gem::Version
|
414
414
|
version: '0'
|
415
415
|
requirements: []
|
416
|
-
rubygems_version: 3.
|
416
|
+
rubygems_version: 3.4.3
|
417
417
|
signing_key:
|
418
418
|
specification_version: 4
|
419
419
|
summary: Object-relational mapper framework (part of Rails).
|