actionpack 6.1.4.1 → 6.1.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: 65eaf0a7cdcac42378d27ebca8973bfb4cdf41b0dd79425c2b276c83460bd39b
4
- data.tar.gz: d76e6cfc52492a8e7a1c0fc21e59e1cd60ec3c464feb2f304dbbb037418a9739
3
+ metadata.gz: 5825f14a026c24d4ddea1860c90e32db978e31f6bec3fe2e986abb3fce8e946a
4
+ data.tar.gz: 2e02124fc9c555eac945ba0abd0db217281fdb5581adae592d656b43c65c7c48
5
5
  SHA512:
6
- metadata.gz: a6033213d92c1734124bf7e3b75c61c3f304cf507052f52f85ac96a6ae7079c3c7e526a76ddfdb3024afb0de8fe8e5f6a6fda1d68a8f4ba69c8f048b0902d782
7
- data.tar.gz: 4de05a81d6de0efb723dbeb96cb28e403fbe8bfb96963ee64f69dbb22d67ce320393f71b5afaab5dbc65b493e238e176642cc898671019b592c9fa43b9082234
6
+ metadata.gz: d0af835716768a29451414527cf754158c113216f76c22de30c30afeedf2efbfe3b2621af1a1ac9b2ddeff94c81682a85ad67e78538beb4ca576be5178791d01
7
+ data.tar.gz: f8e6917a5fd4dd3962ef44b538c321029094de33333942ba0b5dbca517ce637b31b27cee76c1281af69fd32c4449383834314e9e56e0021d43d51c2cf67524aa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Rails 6.1.4.2 (December 14, 2021) ##
2
+
3
+ * Fix X_FORWARDED_HOST protection. [CVE-2021-44528]
4
+
1
5
  ## Rails 6.1.4.1 (August 19, 2021) ##
2
6
 
3
7
  * [CVE-2021-22942] Fix possible open redirect in Host Authorization middleware.
@@ -51,7 +51,7 @@ module ActionDispatch
51
51
 
52
52
  def sanitize_string(host)
53
53
  if host.start_with?(".")
54
- /\A(.+\.)?#{Regexp.escape(host[1..-1])}\z/i
54
+ /\A([a-z0-9-]+\.)?#{Regexp.escape(host[1..-1])}\z/i
55
55
  else
56
56
  /\A#{Regexp.escape host}\z/i
57
57
  end
@@ -102,13 +102,9 @@ module ActionDispatch
102
102
  end
103
103
 
104
104
  private
105
- HOSTNAME = /[a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9.:]+\]/i
106
- VALID_ORIGIN_HOST = /\A(#{HOSTNAME})(?::\d+)?\z/
107
- VALID_FORWARDED_HOST = /(?:\A|,[ ]?)(#{HOSTNAME})(?::\d+)?\z/
108
-
109
105
  def authorized?(request)
110
- origin_host = request.get_header("HTTP_HOST")&.slice(VALID_ORIGIN_HOST, 1) || ""
111
- forwarded_host = request.x_forwarded_host&.slice(VALID_FORWARDED_HOST, 1) || ""
106
+ origin_host = request.get_header("HTTP_HOST")
107
+ forwarded_host = request.x_forwarded_host&.split(/,\s?/)&.last
112
108
 
113
109
  @permissions.allows?(origin_host) && (forwarded_host.blank? || @permissions.allows?(forwarded_host))
114
110
  end
@@ -10,7 +10,7 @@ module ActionPack
10
10
  MAJOR = 6
11
11
  MINOR = 1
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.1.4.1
4
+ version: 6.1.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.1.4.1
19
+ version: 6.1.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.1.4.1
26
+ version: 6.1.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.1.4.1
101
+ version: 6.1.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.1.4.1
108
+ version: 6.1.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.1.4.1
115
+ version: 6.1.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.1.4.1
122
+ version: 6.1.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
@@ -309,10 +309,10 @@ licenses:
309
309
  - MIT
310
310
  metadata:
311
311
  bug_tracker_uri: https://github.com/rails/rails/issues
312
- changelog_uri: https://github.com/rails/rails/blob/v6.1.4.1/actionpack/CHANGELOG.md
313
- documentation_uri: https://api.rubyonrails.org/v6.1.4.1/
312
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.4.2/actionpack/CHANGELOG.md
313
+ documentation_uri: https://api.rubyonrails.org/v6.1.4.2/
314
314
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
315
- source_code_uri: https://github.com/rails/rails/tree/v6.1.4.1/actionpack
315
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.4.2/actionpack
316
316
  post_install_message:
317
317
  rdoc_options: []
318
318
  require_paths: