actionpack 7.1.5 → 7.1.5.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: 6a7008692ffae65ab1ef1cbeaa122083b97317ca660c8b77f5d0bf9ad4400ee8
|
4
|
+
data.tar.gz: 373bc828b7ce749c2e19afd82221d4bf3f3a2e1db4ac47e6562e88f39c540323
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad31650005df8836752a0524ab4a393a6de9a386249e0270fbd09015a5f56714c1d0fcabc3a564ba6747902862981410ca80d46b19f9e5a60af2c100341cdb84
|
7
|
+
data.tar.gz: d02fbaed346ff5a82a47a1ce5d0ffcae8fc84cec699e1c0ebd4a670f296a7a53e48b3c7f19ea5e417fc53a415929b5e3149bd213bbecd0f622c9c6218498dbeb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## Rails 7.1.5.2 (August 13, 2025) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 7.1.5.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.1.5 (October 30, 2024) ##
|
2
17
|
|
3
18
|
* No changes.
|
@@ -24,6 +24,9 @@ module ActionDispatch # :nodoc:
|
|
24
24
|
# policy.report_uri "/csp-violation-report-endpoint"
|
25
25
|
# end
|
26
26
|
class ContentSecurityPolicy
|
27
|
+
class InvalidDirectiveError < StandardError
|
28
|
+
end
|
29
|
+
|
27
30
|
class Middleware
|
28
31
|
def initialize(app)
|
29
32
|
@app = app
|
@@ -317,9 +320,9 @@ module ActionDispatch # :nodoc:
|
|
317
320
|
@directives.map do |directive, sources|
|
318
321
|
if sources.is_a?(Array)
|
319
322
|
if nonce && nonce_directive?(directive, nonce_directives)
|
320
|
-
"#{directive} #{build_directive(sources, context).join(' ')} 'nonce-#{nonce}'"
|
323
|
+
"#{directive} #{build_directive(directive, sources, context).join(' ')} 'nonce-#{nonce}'"
|
321
324
|
else
|
322
|
-
"#{directive} #{build_directive(sources, context).join(' ')}"
|
325
|
+
"#{directive} #{build_directive(directive, sources, context).join(' ')}"
|
323
326
|
end
|
324
327
|
elsif sources
|
325
328
|
directive
|
@@ -329,8 +332,22 @@ module ActionDispatch # :nodoc:
|
|
329
332
|
end
|
330
333
|
end
|
331
334
|
|
332
|
-
def
|
333
|
-
sources.
|
335
|
+
def validate(directive, sources)
|
336
|
+
sources.flatten.each do |source|
|
337
|
+
if source.include?(";") || source != source.gsub(/[[:space:]]/, "")
|
338
|
+
raise InvalidDirectiveError, <<~MSG.squish
|
339
|
+
Invalid Content Security Policy #{directive}: "#{source}".
|
340
|
+
Directive values must not contain whitespace or semicolons.
|
341
|
+
Please use multiple arguments or other directive methods instead.
|
342
|
+
MSG
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
def build_directive(directive, sources, context)
|
348
|
+
resolved_sources = sources.map { |source| resolve_source(source, context) }
|
349
|
+
|
350
|
+
validate(directive, resolved_sources)
|
334
351
|
end
|
335
352
|
|
336
353
|
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.1.5
|
4
|
+
version: 7.1.5.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.1.5
|
18
|
+
version: 7.1.5.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.1.5
|
25
|
+
version: 7.1.5.2
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: nokogiri
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,28 +127,28 @@ dependencies:
|
|
128
127
|
requirements:
|
129
128
|
- - '='
|
130
129
|
- !ruby/object:Gem::Version
|
131
|
-
version: 7.1.5
|
130
|
+
version: 7.1.5.2
|
132
131
|
type: :runtime
|
133
132
|
prerelease: false
|
134
133
|
version_requirements: !ruby/object:Gem::Requirement
|
135
134
|
requirements:
|
136
135
|
- - '='
|
137
136
|
- !ruby/object:Gem::Version
|
138
|
-
version: 7.1.5
|
137
|
+
version: 7.1.5.2
|
139
138
|
- !ruby/object:Gem::Dependency
|
140
139
|
name: activemodel
|
141
140
|
requirement: !ruby/object:Gem::Requirement
|
142
141
|
requirements:
|
143
142
|
- - '='
|
144
143
|
- !ruby/object:Gem::Version
|
145
|
-
version: 7.1.5
|
144
|
+
version: 7.1.5.2
|
146
145
|
type: :development
|
147
146
|
prerelease: false
|
148
147
|
version_requirements: !ruby/object:Gem::Requirement
|
149
148
|
requirements:
|
150
149
|
- - '='
|
151
150
|
- !ruby/object:Gem::Version
|
152
|
-
version: 7.1.5
|
151
|
+
version: 7.1.5.2
|
153
152
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
154
153
|
testing MVC web applications. Works with any Rack-compatible server.
|
155
154
|
email: david@loudthinking.com
|
@@ -346,12 +345,11 @@ licenses:
|
|
346
345
|
- MIT
|
347
346
|
metadata:
|
348
347
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
349
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.1.5/actionpack/CHANGELOG.md
|
350
|
-
documentation_uri: https://api.rubyonrails.org/v7.1.5/
|
348
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.1.5.2/actionpack/CHANGELOG.md
|
349
|
+
documentation_uri: https://api.rubyonrails.org/v7.1.5.2/
|
351
350
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
352
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.1.5/actionpack
|
351
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.1.5.2/actionpack
|
353
352
|
rubygems_mfa_required: 'true'
|
354
|
-
post_install_message:
|
355
353
|
rdoc_options: []
|
356
354
|
require_paths:
|
357
355
|
- lib
|
@@ -367,8 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
367
365
|
version: '0'
|
368
366
|
requirements:
|
369
367
|
- none
|
370
|
-
rubygems_version: 3.
|
371
|
-
signing_key:
|
368
|
+
rubygems_version: 3.6.9
|
372
369
|
specification_version: 4
|
373
370
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|
374
371
|
test_files: []
|