actionpack 5.2.1.1 → 5.2.2.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -0
- data/lib/abstract_controller.rb +1 -0
- data/lib/action_controller/metal/redirecting.rb +1 -1
- data/lib/action_dispatch/http/content_security_policy.rb +4 -2
- data/lib/action_dispatch/request/utils.rb +2 -0
- data/lib/action_dispatch/routing/inspector.rb +1 -1
- data/lib/action_dispatch/routing/mapper.rb +1 -1
- data/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +5 -2
- data/lib/action_pack/gem_version.rb +2 -2
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84f933e1a01289cfe944e71690e8b6e57761b783ffecaaedf163bf2223d044f4
|
4
|
+
data.tar.gz: a80740332ed27082ca9fdbf9aef3f609dd6069f3867d3ccefa6989ce6a459f38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff95cc5b118ad463c2a1b6450ecc65241a7c97e1a0952fb712d95b54df4775a770b63d671bef6f2da1495ff2a43bd3af4582f531df648bd4b845f2088efa7c5a
|
7
|
+
data.tar.gz: 831ec7b12c505f559903baa3ff74e30e2431df2ff7ded6228fecdb664ed93de75d63598f58b2ce2b4d791f62a8cbcc4277ed4297511adc5e9da64d77b79ac23d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,48 @@
|
|
1
|
+
## Rails 5.2.2.rc1 (November 28, 2018) ##
|
2
|
+
|
3
|
+
* Reset Capybara sessions if failed system test screenshot raising an exception.
|
4
|
+
|
5
|
+
Reset Capybara sessions if `take_failed_screenshot` raise exception
|
6
|
+
in system test `after_teardown`.
|
7
|
+
|
8
|
+
*Maxim Perepelitsa*
|
9
|
+
|
10
|
+
* Use request object for context if there's no controller
|
11
|
+
|
12
|
+
There is no controller instance when using a redirect route or a
|
13
|
+
mounted rack application so pass the request object as the context
|
14
|
+
when resolving dynamic CSP sources in this scenario.
|
15
|
+
|
16
|
+
Fixes #34200.
|
17
|
+
|
18
|
+
*Andrew White*
|
19
|
+
|
20
|
+
* Apply mapping to symbols returned from dynamic CSP sources
|
21
|
+
|
22
|
+
Previously if a dynamic source returned a symbol such as :self it
|
23
|
+
would be converted to a string implicity, e.g:
|
24
|
+
|
25
|
+
policy.default_src -> { :self }
|
26
|
+
|
27
|
+
would generate the header:
|
28
|
+
|
29
|
+
Content-Security-Policy: default-src self
|
30
|
+
|
31
|
+
and now it generates:
|
32
|
+
|
33
|
+
Content-Security-Policy: default-src 'self'
|
34
|
+
|
35
|
+
*Andrew White*
|
36
|
+
|
37
|
+
* Fix `rails routes -c` for controller name consists of multiple word.
|
38
|
+
|
39
|
+
*Yoshiyuki Kinjo*
|
40
|
+
|
41
|
+
* Call the `#redirect_to` block in controller context.
|
42
|
+
|
43
|
+
*Steven Peckins*
|
44
|
+
|
45
|
+
|
1
46
|
## Rails 5.2.1.1 (November 27, 2018) ##
|
2
47
|
|
3
48
|
* No changes.
|
data/lib/abstract_controller.rb
CHANGED
@@ -105,7 +105,7 @@ module ActionController
|
|
105
105
|
when String
|
106
106
|
request.protocol + request.host_with_port + options
|
107
107
|
when Proc
|
108
|
-
_compute_redirect_to_location request, options
|
108
|
+
_compute_redirect_to_location request, instance_eval(&options)
|
109
109
|
else
|
110
110
|
url_for(options)
|
111
111
|
end.delete("\0\r\n")
|
@@ -22,7 +22,8 @@ module ActionDispatch #:nodoc:
|
|
22
22
|
|
23
23
|
if policy = request.content_security_policy
|
24
24
|
nonce = request.content_security_policy_nonce
|
25
|
-
|
25
|
+
context = request.controller_instance || request
|
26
|
+
headers[header_name(request)] = policy.build(context, nonce)
|
26
27
|
end
|
27
28
|
|
28
29
|
response
|
@@ -256,7 +257,8 @@ module ActionDispatch #:nodoc:
|
|
256
257
|
if context.nil?
|
257
258
|
raise RuntimeError, "Missing context for the dynamic content security policy source: #{source.inspect}"
|
258
259
|
else
|
259
|
-
context.instance_exec(&source)
|
260
|
+
resolved = context.instance_exec(&source)
|
261
|
+
resolved.is_a?(Symbol) ? apply_mapping(resolved) : resolved
|
260
262
|
end
|
261
263
|
else
|
262
264
|
raise RuntimeError, "Unexpected content security policy source: #{source.inspect}"
|
@@ -84,7 +84,7 @@ module ActionDispatch
|
|
84
84
|
|
85
85
|
def normalize_filter(filter)
|
86
86
|
if filter.is_a?(Hash) && filter[:controller]
|
87
|
-
{ controller: /#{filter[:controller].
|
87
|
+
{ controller: /#{filter[:controller].underscore.sub(/_?controller\z/, "")}/ }
|
88
88
|
elsif filter
|
89
89
|
{ controller: /#{filter}/, action: /#{filter}/, verb: /#{filter}/, name: /#{filter}/, path: /#{filter}/ }
|
90
90
|
end
|
@@ -390,7 +390,7 @@ module ActionDispatch
|
|
390
390
|
# for root cases, where the latter is the correct one.
|
391
391
|
def self.normalize_path(path)
|
392
392
|
path = Journey::Router::Utils.normalize_path(path)
|
393
|
-
path.gsub!(%r{/(\(+)/?}, '\1/') unless path =~ %r{
|
393
|
+
path.gsub!(%r{/(\(+)/?}, '\1/') unless path =~ %r{^/(\(+[^)]+\)){1,}$}
|
394
394
|
path
|
395
395
|
end
|
396
396
|
|
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: 5.2.
|
4
|
+
version: 5.2.2.rc1
|
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: 2018-11-
|
11
|
+
date: 2018-11-28 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: 5.2.
|
19
|
+
version: 5.2.2.rc1
|
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: 5.2.
|
26
|
+
version: 5.2.2.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,28 +92,28 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 5.2.
|
95
|
+
version: 5.2.2.rc1
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 5.2.
|
102
|
+
version: 5.2.2.rc1
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: activemodel
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 5.2.
|
109
|
+
version: 5.2.2.rc1
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 5.2.
|
116
|
+
version: 5.2.2.rc1
|
117
117
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
118
118
|
testing MVC web applications. Works with any Rack-compatible server.
|
119
119
|
email: david@loudthinking.com
|
@@ -293,8 +293,8 @@ homepage: http://rubyonrails.org
|
|
293
293
|
licenses:
|
294
294
|
- MIT
|
295
295
|
metadata:
|
296
|
-
source_code_uri: https://github.com/rails/rails/tree/v5.2.
|
297
|
-
changelog_uri: https://github.com/rails/rails/blob/v5.2.
|
296
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.2.2.rc1/actionpack
|
297
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.2.2.rc1/actionpack/CHANGELOG.md
|
298
298
|
post_install_message:
|
299
299
|
rdoc_options: []
|
300
300
|
require_paths:
|
@@ -306,9 +306,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
306
306
|
version: 2.2.2
|
307
307
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
308
308
|
requirements:
|
309
|
-
- - "
|
309
|
+
- - ">"
|
310
310
|
- !ruby/object:Gem::Version
|
311
|
-
version:
|
311
|
+
version: 1.3.1
|
312
312
|
requirements:
|
313
313
|
- none
|
314
314
|
rubyforge_project:
|