actionpack 7.2.1 → 7.2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad5df5d698f6b5b3720582f5b9668642d3c84c158c2e68ab22cf2c5553d1c2bd
4
- data.tar.gz: 02d6dfa8681209c9e9f23c4e67122d900791473c4791b580407912b1f03de304
3
+ metadata.gz: d8587fb38c365e101c7ccedbc8f327e93c2a2bb6ed68d8b3eee91e25c7cc4cc3
4
+ data.tar.gz: 12752d536fdccb865158f457758dd09c945934fc81ad1c831ba2fa93a90bf264
5
5
  SHA512:
6
- metadata.gz: 3c21ca2e69a2b919357b3a31523069a0e07b8cd81762a42dcae0a368fa3ee7ac4e43e4dc3e4084eec7be45fca4cb50ce3585bb777ff5ad4bfdffefa8faac514b
7
- data.tar.gz: ff39192baff8f199d5820cdf0f67f85886d4d25ba5f9953a6928677c5f849af270f6d163fd95854249f0d6b4d78b8f0bd4917c2ad1dc33036dae29bba92949c0
6
+ metadata.gz: 8f3cce17e7ddf0925224aab95355f0dcc88862090c07bfdfcf4e56b527df43032c6491112287ecc78b4b4966eaadeceb43f4b7ceb2ef1ec88ce7626f358bd51e
7
+ data.tar.gz: 1243e708a9570acbdac7defd4345d78575869f0397140ca4ba8c8b422465b56bdcfd0359e9332ac52c54836d8d056611315c81c24ff3e8a163ecf613cdafa14a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## Rails 7.2.1.2 (October 23, 2024) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.2.1.1 (October 15, 2024) ##
7
+
8
+ * Avoid regex backtracking in HTTP Token authentication
9
+
10
+ [CVE-2024-47887]
11
+
12
+ * Avoid regex backtracking in query parameter filtering
13
+
14
+ [CVE-2024-41128]
15
+
1
16
  ## Rails 7.2.1 (August 22, 2024) ##
2
17
 
3
18
  * Fix `Request#raw_post` raising `NoMethodError` when `rack.input` is `nil`.
@@ -513,14 +513,11 @@ module ActionController
513
513
  array_params.each { |param| (param[1] || +"").gsub! %r/^"|"$/, "" }
514
514
  end
515
515
 
516
- WHITESPACED_AUTHN_PAIR_DELIMITERS = /\s*#{AUTHN_PAIR_DELIMITERS}\s*/
517
- private_constant :WHITESPACED_AUTHN_PAIR_DELIMITERS
518
-
519
516
  # This method takes an authorization body and splits up the key-value pairs by
520
517
  # the standardized `:`, `;`, or `\t` delimiters defined in
521
518
  # `AUTHN_PAIR_DELIMITERS`.
522
519
  def raw_params(auth)
523
- _raw_params = auth.sub(TOKEN_REGEX, "").split(WHITESPACED_AUTHN_PAIR_DELIMITERS)
520
+ _raw_params = auth.sub(TOKEN_REGEX, "").split(AUTHN_PAIR_DELIMITERS).map(&:strip)
524
521
  _raw_params.reject!(&:empty?)
525
522
 
526
523
  if !_raw_params.first&.start_with?(TOKEN_KEY)
@@ -68,12 +68,17 @@ module ActionDispatch
68
68
  ActiveSupport::ParameterFilter.new(filters)
69
69
  end
70
70
 
71
- KV_RE = "[^&;=]+"
72
- PAIR_RE = %r{(#{KV_RE})=(#{KV_RE})}
73
71
  def filtered_query_string # :doc:
74
- query_string.gsub(PAIR_RE) do |_|
75
- parameter_filter.filter($1 => $2).first.join("=")
72
+ parts = query_string.split(/([&;])/)
73
+ filtered_parts = parts.map do |part|
74
+ if part.include?("=")
75
+ key, value = part.split("=", 2)
76
+ parameter_filter.filter(key => value).first.join("=")
77
+ else
78
+ part
79
+ end
76
80
  end
81
+ filtered_parts.join("")
77
82
  end
78
83
  end
79
84
  end
@@ -37,9 +37,16 @@ module ActionDispatch
37
37
  def parameter_filtered_location
38
38
  uri = URI.parse(location)
39
39
  unless uri.query.nil? || uri.query.empty?
40
- uri.query.gsub!(FilterParameters::PAIR_RE) do
41
- request.parameter_filter.filter($1 => $2).first.join("=")
40
+ parts = uri.query.split(/([&;])/)
41
+ filtered_parts = parts.map do |part|
42
+ if part.include?("=")
43
+ key, value = part.split("=", 2)
44
+ request.parameter_filter.filter(key => value).first.join("=")
45
+ else
46
+ part
47
+ end
42
48
  end
49
+ uri.query = filtered_parts.join("")
43
50
  end
44
51
  uri.to_s
45
52
  rescue URI::Error
@@ -12,7 +12,7 @@ module ActionPack
12
12
  MAJOR = 7
13
13
  MINOR = 2
14
14
  TINY = 1
15
- PRE = nil
15
+ PRE = "2"
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.1
4
+ version: 7.2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-22 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.2.1
19
+ version: 7.2.1.2
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: 7.2.1
26
+ version: 7.2.1.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -148,28 +148,28 @@ dependencies:
148
148
  requirements:
149
149
  - - '='
150
150
  - !ruby/object:Gem::Version
151
- version: 7.2.1
151
+ version: 7.2.1.2
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - '='
157
157
  - !ruby/object:Gem::Version
158
- version: 7.2.1
158
+ version: 7.2.1.2
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: activemodel
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - '='
164
164
  - !ruby/object:Gem::Version
165
- version: 7.2.1
165
+ version: 7.2.1.2
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - '='
171
171
  - !ruby/object:Gem::Version
172
- version: 7.2.1
172
+ version: 7.2.1.2
173
173
  description: Web apps on Rails. Simple, battle-tested conventions for building and
174
174
  testing MVC web applications. Works with any Rack-compatible server.
175
175
  email: david@loudthinking.com
@@ -369,12 +369,12 @@ licenses:
369
369
  - MIT
370
370
  metadata:
371
371
  bug_tracker_uri: https://github.com/rails/rails/issues
372
- changelog_uri: https://github.com/rails/rails/blob/v7.2.1/actionpack/CHANGELOG.md
373
- documentation_uri: https://api.rubyonrails.org/v7.2.1/
372
+ changelog_uri: https://github.com/rails/rails/blob/v7.2.1.2/actionpack/CHANGELOG.md
373
+ documentation_uri: https://api.rubyonrails.org/v7.2.1.2/
374
374
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
375
- source_code_uri: https://github.com/rails/rails/tree/v7.2.1/actionpack
375
+ source_code_uri: https://github.com/rails/rails/tree/v7.2.1.2/actionpack
376
376
  rubygems_mfa_required: 'true'
377
- post_install_message:
377
+ post_install_message:
378
378
  rdoc_options: []
379
379
  require_paths:
380
380
  - lib
@@ -390,8 +390,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
390
  version: '0'
391
391
  requirements:
392
392
  - none
393
- rubygems_version: 3.5.11
394
- signing_key:
393
+ rubygems_version: 3.5.16
394
+ signing_key:
395
395
  specification_version: 4
396
396
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
397
397
  test_files: []