actionpack 6.0.4.1 → 6.0.4.2

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: a1ce7e505c443ac3626576f8ee7d9f877df0f805a2f200993f67d377ffb39637
4
- data.tar.gz: 63c9a462a845c3775f90d60d4a7554c3ec67c9090d67199210cf9978f8117469
3
+ metadata.gz: d0922e2737ef8018658defe59245777e028d0e51257716db1ba1586c166756df
4
+ data.tar.gz: 92c40c67a4914dc5e87aad14434ac3cff2a2a73782459b55a8984b8708a577b7
5
5
  SHA512:
6
- metadata.gz: b38a9f6e715de35d394eae37a599abf39e277b3f87916b648ede6489d499c9c638408f6d874eb47a22ce1b1fcf6eeac682125bbec92881b90002baf838df0e7e
7
- data.tar.gz: 28abb4b6e0e463cba47474ea4e2c7d6c5fded3f4bace5853a32acdfd36bc0ebcaa699ea5c7444c5ca9a98210d23f7d63660c9237ba0389ffe2647e22d95d52e3
6
+ metadata.gz: 536f840999ed225ce831364206e19708fb49ad653181d8719d0c27cb349ccf8a7afc0028363d68f3a367b6ce953a799aa0c00e0f8e7250da6fa32e6b0da9ebb7
7
+ data.tar.gz: 4896b9e8f50500b8b20c05bedd95cf5b51850c37ef6b9d7d815b408c8ac803f493b2bc6e8b30dceae5864165aea678f0b4b0c974b2fa83859761039bdf844ab6
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## Rails 6.0.4.1 (August 19, 2021) ##
1
+ ## Rails 6.0.4.2 (December 14, 2021) ##
2
+
3
+ * Fix X_FORWARDED_HOST protection. [CVE-2021-44528]
4
+
5
+ ## Rails 6.1.4.1 (August 19, 2021) ##
2
6
 
3
7
  * [CVE-2021-22942] Fix possible open redirect in Host Authorization middleware.
4
8
 
@@ -46,7 +46,7 @@ module ActionDispatch
46
46
 
47
47
  def sanitize_string(host)
48
48
  if host.start_with?(".")
49
- /\A(.+\.)?#{Regexp.escape(host[1..-1])}\z/i
49
+ /\A([a-z0-9-]+\.)?#{Regexp.escape(host[1..-1])}\z/i
50
50
  else
51
51
  /\A#{Regexp.escape host}\z/i
52
52
  end
@@ -86,13 +86,9 @@ module ActionDispatch
86
86
  end
87
87
 
88
88
  private
89
- HOSTNAME = /[a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9.:]+\]/i
90
- VALID_ORIGIN_HOST = /\A(#{HOSTNAME})(?::\d+)?\z/
91
- VALID_FORWARDED_HOST = /(?:\A|,[ ]?)(#{HOSTNAME})(?::\d+)?\z/
92
-
93
89
  def authorized?(request)
94
- origin_host = request.get_header("HTTP_HOST")&.slice(VALID_ORIGIN_HOST, 1) || ""
95
- forwarded_host = request.x_forwarded_host&.slice(VALID_FORWARDED_HOST, 1) || ""
90
+ origin_host = request.get_header("HTTP_HOST")
91
+ forwarded_host = request.x_forwarded_host&.split(/,\s?/)&.last
96
92
 
97
93
  @permissions.allows?(origin_host) && (forwarded_host.blank? || @permissions.allows?(forwarded_host))
98
94
  end
@@ -10,7 +10,7 @@ module ActionPack
10
10
  MAJOR = 6
11
11
  MINOR = 0
12
12
  TINY = 4
13
- PRE = "1"
13
+ PRE = "2"
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.4.1
4
+ version: 6.0.4.2
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: 2021-08-19 00:00:00.000000000 Z
11
+ date: 2021-12-14 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.4.1
19
+ version: 6.0.4.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: 6.0.4.1
26
+ version: 6.0.4.2
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.4.1
101
+ version: 6.0.4.2
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.4.1
108
+ version: 6.0.4.2
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.4.1
115
+ version: 6.0.4.2
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.4.1
122
+ version: 6.0.4.2
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,10 +310,10 @@ 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.4.1/actionpack/CHANGELOG.md
314
- documentation_uri: https://api.rubyonrails.org/v6.0.4.1/
313
+ changelog_uri: https://github.com/rails/rails/blob/v6.0.4.2/actionpack/CHANGELOG.md
314
+ documentation_uri: https://api.rubyonrails.org/v6.0.4.2/
315
315
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
316
- source_code_uri: https://github.com/rails/rails/tree/v6.0.4.1/actionpack
316
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.4.2/actionpack
317
317
  post_install_message:
318
318
  rdoc_options: []
319
319
  require_paths: