actionpack 6.0.3.4 → 6.0.3.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3767927eaf2709c272ca4da197a4e356dbd7d4fffaf78a10eb4f4f9ee5b0d0d
4
- data.tar.gz: cf187c693653a55c75afd103afc829422ea107936e03aabddb594ac52f6cfad8
3
+ metadata.gz: 5203f7e82a9df250415584df22acab73cd81df0958ba9f6dc5c46c7a3932cd6b
4
+ data.tar.gz: d700bbc8d27192eab2a962dd44119c1bd95115b5a037ee2c6808dd90519828f3
5
5
  SHA512:
6
- metadata.gz: 3b93fe304a8ec1ed90fc09a076fd54d6beee63fff8e7594e4b71c0c67b57515f0c53f9ac11435ca7f81940dd03b17a671f6b5d1065d2c063d6c40fe367a5808e
7
- data.tar.gz: ec62a4e0f89af114bfe4d00e88ca875fec9c2f68f81ee1fd27aef57629ea0e2680968b5a10d092813b054c55b4c654cf0b57dd029d4d55bfaf4fb1f3ba409176
6
+ metadata.gz: 8e9d74012757c217e092bd3ee0a9b6f6c5cb0ddcd3756166090dc108a09f02287fd964bb8a2729cdb7db78b8206f44de3dfd63238321027b449b926e279ce671
7
+ data.tar.gz: 5c32c82aa600ca697666a78db8bfa7a15cde7f8ef702b79043fb5b73e8a7c8a12ad654161e9d9d6ce311e9954d8fa0100de0910266d7e0ef2976789723e0bda5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## Rails 6.0.3.5 (February 10, 2021) ##
2
+
3
+ * Prevent open redirect when allowed host starts with a dot
4
+
5
+ [CVE-2021-22881]
6
+
7
+ Thanks to @tktech (https://hackerone.com/tktech) for reporting this
8
+ issue and the patch!
9
+
10
+ *Aaron Patterson*
11
+
12
+
1
13
  ## Rails 6.0.3.4 (October 07, 2020) ##
2
14
 
3
15
  * [CVE-2020-8264] Prevent XSS in Actionable Exceptions
@@ -87,11 +87,20 @@ module ActionDispatch
87
87
 
88
88
  private
89
89
  def authorized?(request)
90
- origin_host = request.get_header("HTTP_HOST").to_s.sub(/:\d+\z/, "")
91
- forwarded_host = request.x_forwarded_host.to_s.split(/,\s?/).last.to_s.sub(/:\d+\z/, "")
92
-
93
- @permissions.allows?(origin_host) &&
94
- (forwarded_host.blank? || @permissions.allows?(forwarded_host))
90
+ valid_host = /
91
+ \A
92
+ (?<host>[a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])
93
+ (:\d+)?
94
+ \z
95
+ /x
96
+
97
+ origin_host = valid_host.match(
98
+ request.get_header("HTTP_HOST").to_s.downcase)
99
+ forwarded_host = valid_host.match(
100
+ request.x_forwarded_host.to_s.split(/,\s?/).last)
101
+
102
+ origin_host && @permissions.allows?(origin_host[:host]) && (
103
+ forwarded_host.nil? || @permissions.allows?(forwarded_host[:host]))
95
104
  end
96
105
 
97
106
  def mark_as_authorized(request)
@@ -10,7 +10,7 @@ module ActionPack
10
10
  MAJOR = 6
11
11
  MINOR = 0
12
12
  TINY = 3
13
- PRE = "4"
13
+ PRE = "5"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  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: 6.0.3.4
4
+ version: 6.0.3.5
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: 2020-10-07 00:00:00.000000000 Z
11
+ date: 2021-02-10 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: 6.0.3.4
19
+ version: 6.0.3.5
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.3.4
26
+ version: 6.0.3.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -98,28 +98,28 @@ dependencies:
98
98
  requirements:
99
99
  - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 6.0.3.4
101
+ version: 6.0.3.5
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - '='
107
107
  - !ruby/object:Gem::Version
108
- version: 6.0.3.4
108
+ version: 6.0.3.5
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: activemodel
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - '='
114
114
  - !ruby/object:Gem::Version
115
- version: 6.0.3.4
115
+ version: 6.0.3.5
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - '='
121
121
  - !ruby/object:Gem::Version
122
- version: 6.0.3.4
122
+ version: 6.0.3.5
123
123
  description: Web apps on Rails. Simple, battle-tested conventions for building and
124
124
  testing MVC web applications. Works with any Rack-compatible server.
125
125
  email: david@loudthinking.com
@@ -310,11 +310,11 @@ licenses:
310
310
  - MIT
311
311
  metadata:
312
312
  bug_tracker_uri: https://github.com/rails/rails/issues
313
- changelog_uri: https://github.com/rails/rails/blob/v6.0.3.4/actionpack/CHANGELOG.md
314
- documentation_uri: https://api.rubyonrails.org/v6.0.3.4/
313
+ changelog_uri: https://github.com/rails/rails/blob/v6.0.3.5/actionpack/CHANGELOG.md
314
+ documentation_uri: https://api.rubyonrails.org/v6.0.3.5/
315
315
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
316
- source_code_uri: https://github.com/rails/rails/tree/v6.0.3.4/actionpack
317
- post_install_message:
316
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.3.5/actionpack
317
+ post_install_message:
318
318
  rdoc_options: []
319
319
  require_paths:
320
320
  - lib
@@ -330,8 +330,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
330
330
  version: '0'
331
331
  requirements:
332
332
  - none
333
- rubygems_version: 3.1.4
334
- signing_key:
333
+ rubygems_version: 3.0.3
334
+ signing_key:
335
335
  specification_version: 4
336
336
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
337
337
  test_files: []