actionpack 7.2.2 → 7.2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/action_dispatch/http/content_security_policy.rb +21 -4
- data/lib/action_pack/gem_version.rb +1 -1
- metadata +12 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de497a4bfe038de60adf6ae41286240f2876e6708be4aa79f87639cf7c1b95d3
|
4
|
+
data.tar.gz: 77b807fbf7571a65674d4b78affdcc0c54821c935d6ec6634ee8e5fe63a13015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8761d3f2b5c3be0bfd48360b9f568974a34c47752357b56b81a751068e5b27bc3b26a2474274be3653f3b822042c371346c502d61afc35f95fee4a614e93ee9
|
7
|
+
data.tar.gz: 0cda820f77379fa28d2243069428fbd068f7020b7ee1d9555b315e4924c9e866d8d08ff30d2b7e67680fe2fcd9706f435f9f542edf8ef8b4f84f4788858b48e0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## Rails 7.2.2.2 (August 13, 2025) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 7.2.2.1 (December 10, 2024) ##
|
7
|
+
|
8
|
+
* Add validation to content security policies to disallow spaces and semicolons.
|
9
|
+
Developers should use multiple arguments, and different directive methods instead.
|
10
|
+
|
11
|
+
[CVE-2024-54133]
|
12
|
+
|
13
|
+
*Gannon McGibbon*
|
14
|
+
|
15
|
+
|
1
16
|
## Rails 7.2.2 (October 30, 2024) ##
|
2
17
|
|
3
18
|
* Fix non-GET requests not updating cookies in `ActionController::TestCase`.
|
@@ -26,6 +26,9 @@ module ActionDispatch # :nodoc:
|
|
26
26
|
# policy.report_uri "/csp-violation-report-endpoint"
|
27
27
|
# end
|
28
28
|
class ContentSecurityPolicy
|
29
|
+
class InvalidDirectiveError < StandardError
|
30
|
+
end
|
31
|
+
|
29
32
|
class Middleware
|
30
33
|
def initialize(app)
|
31
34
|
@app = app
|
@@ -319,9 +322,9 @@ module ActionDispatch # :nodoc:
|
|
319
322
|
@directives.map do |directive, sources|
|
320
323
|
if sources.is_a?(Array)
|
321
324
|
if nonce && nonce_directive?(directive, nonce_directives)
|
322
|
-
"#{directive} #{build_directive(sources, context).join(' ')} 'nonce-#{nonce}'"
|
325
|
+
"#{directive} #{build_directive(directive, sources, context).join(' ')} 'nonce-#{nonce}'"
|
323
326
|
else
|
324
|
-
"#{directive} #{build_directive(sources, context).join(' ')}"
|
327
|
+
"#{directive} #{build_directive(directive, sources, context).join(' ')}"
|
325
328
|
end
|
326
329
|
elsif sources
|
327
330
|
directive
|
@@ -331,8 +334,22 @@ module ActionDispatch # :nodoc:
|
|
331
334
|
end
|
332
335
|
end
|
333
336
|
|
334
|
-
def
|
335
|
-
sources.
|
337
|
+
def validate(directive, sources)
|
338
|
+
sources.flatten.each do |source|
|
339
|
+
if source.include?(";") || source != source.gsub(/[[:space:]]/, "")
|
340
|
+
raise InvalidDirectiveError, <<~MSG.squish
|
341
|
+
Invalid Content Security Policy #{directive}: "#{source}".
|
342
|
+
Directive values must not contain whitespace or semicolons.
|
343
|
+
Please use multiple arguments or other directive methods instead.
|
344
|
+
MSG
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
def build_directive(directive, sources, context)
|
350
|
+
resolved_sources = sources.map { |source| resolve_source(source, context) }
|
351
|
+
|
352
|
+
validate(directive, resolved_sources)
|
336
353
|
end
|
337
354
|
|
338
355
|
def resolve_source(source, context)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.2
|
4
|
+
version: 7.2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -16,14 +15,14 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - '='
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.2.2
|
18
|
+
version: 7.2.2.2
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - '='
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 7.2.2
|
25
|
+
version: 7.2.2.2
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: nokogiri
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,28 +147,28 @@ dependencies:
|
|
148
147
|
requirements:
|
149
148
|
- - '='
|
150
149
|
- !ruby/object:Gem::Version
|
151
|
-
version: 7.2.2
|
150
|
+
version: 7.2.2.2
|
152
151
|
type: :runtime
|
153
152
|
prerelease: false
|
154
153
|
version_requirements: !ruby/object:Gem::Requirement
|
155
154
|
requirements:
|
156
155
|
- - '='
|
157
156
|
- !ruby/object:Gem::Version
|
158
|
-
version: 7.2.2
|
157
|
+
version: 7.2.2.2
|
159
158
|
- !ruby/object:Gem::Dependency
|
160
159
|
name: activemodel
|
161
160
|
requirement: !ruby/object:Gem::Requirement
|
162
161
|
requirements:
|
163
162
|
- - '='
|
164
163
|
- !ruby/object:Gem::Version
|
165
|
-
version: 7.2.2
|
164
|
+
version: 7.2.2.2
|
166
165
|
type: :development
|
167
166
|
prerelease: false
|
168
167
|
version_requirements: !ruby/object:Gem::Requirement
|
169
168
|
requirements:
|
170
169
|
- - '='
|
171
170
|
- !ruby/object:Gem::Version
|
172
|
-
version: 7.2.2
|
171
|
+
version: 7.2.2.2
|
173
172
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
174
173
|
testing MVC web applications. Works with any Rack-compatible server.
|
175
174
|
email: david@loudthinking.com
|
@@ -369,12 +368,11 @@ licenses:
|
|
369
368
|
- MIT
|
370
369
|
metadata:
|
371
370
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
372
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.2.2/actionpack/CHANGELOG.md
|
373
|
-
documentation_uri: https://api.rubyonrails.org/v7.2.2/
|
371
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.2.2.2/actionpack/CHANGELOG.md
|
372
|
+
documentation_uri: https://api.rubyonrails.org/v7.2.2.2/
|
374
373
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
375
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.2.2/actionpack
|
374
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.2.2.2/actionpack
|
376
375
|
rubygems_mfa_required: 'true'
|
377
|
-
post_install_message:
|
378
376
|
rdoc_options: []
|
379
377
|
require_paths:
|
380
378
|
- lib
|
@@ -390,8 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
390
388
|
version: '0'
|
391
389
|
requirements:
|
392
390
|
- none
|
393
|
-
rubygems_version: 3.
|
394
|
-
signing_key:
|
391
|
+
rubygems_version: 3.6.9
|
395
392
|
specification_version: 4
|
396
393
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|
397
394
|
test_files: []
|