gitlab-puma 4.3.1.gitlab.2 → 4.3.3.gitlab.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/History.md +12 -0
- data/lib/puma/const.rb +2 -1
- data/lib/puma/server.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 03e5cb5dedbb4d7954301cdff029724f82ed81b9b9fedafbc21fde9a90b62fdb
|
|
4
|
+
data.tar.gz: 703e172841c638fc21999da3b6ffc3672ad2e4a1d70c4c7a73b906571baacbbe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2fe9f28e21ee51ec4f8f9131747131b563b0f3e46f045cd406cc39568b98452622af27a6219eb1fb6f172eac767cbee3875a6e534e9c7e31112ff502dee2c08
|
|
7
|
+
data.tar.gz: d0d1e0232bdbe157c8258f96b2ed6c7bec5e5bc5d1e6c616360f294fa7185fa30ad53a5b4c267041b96d2720596eb036a69511a8dd88a7da3e14f1f8bc96de61
|
data/History.md
CHANGED
|
@@ -6,6 +6,18 @@
|
|
|
6
6
|
* Bugfixes
|
|
7
7
|
* Your bugfix goes here (#Github Number)
|
|
8
8
|
|
|
9
|
+
|
|
10
|
+
## 4.3.3 and 3.12.4 / 2020-02-28
|
|
11
|
+
* Bugfixes
|
|
12
|
+
* Fix: Fixes a problem where we weren't splitting headers correctly on newlines (#2132)
|
|
13
|
+
* Security
|
|
14
|
+
* Fix: Prevent HTTP Response splitting via CR in early hints.
|
|
15
|
+
|
|
16
|
+
## 4.3.2 and 3.12.3 / 2020-02-27
|
|
17
|
+
|
|
18
|
+
* Security
|
|
19
|
+
* Fix: Prevent HTTP Response splitting via CR/LF in header values. CVE-2020-5247.
|
|
20
|
+
|
|
9
21
|
## 4.3.1 and 3.12.2 / 2019-12-05
|
|
10
22
|
|
|
11
23
|
* Security
|
data/lib/puma/const.rb
CHANGED
|
@@ -100,7 +100,7 @@ module Puma
|
|
|
100
100
|
# too taxing on performance.
|
|
101
101
|
module Const
|
|
102
102
|
|
|
103
|
-
PUMA_VERSION = VERSION = "4.3.
|
|
103
|
+
PUMA_VERSION = VERSION = "4.3.3.gitlab.2".freeze
|
|
104
104
|
CODE_NAME = "Mysterious Traveller".freeze
|
|
105
105
|
PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
|
|
106
106
|
|
|
@@ -228,6 +228,7 @@ module Puma
|
|
|
228
228
|
COLON = ": ".freeze
|
|
229
229
|
|
|
230
230
|
NEWLINE = "\n".freeze
|
|
231
|
+
HTTP_INJECTION_REGEX = /[\r\n]/.freeze
|
|
231
232
|
|
|
232
233
|
HIJACK_P = "rack.hijack?".freeze
|
|
233
234
|
HIJACK = "rack.hijack".freeze
|
data/lib/puma/server.rb
CHANGED
|
@@ -666,6 +666,7 @@ module Puma
|
|
|
666
666
|
headers.each_pair do |k, vs|
|
|
667
667
|
if vs.respond_to?(:to_s) && !vs.to_s.empty?
|
|
668
668
|
vs.to_s.split(NEWLINE).each do |v|
|
|
669
|
+
next if possible_header_injection?(v)
|
|
669
670
|
fast_write client, "#{k}: #{v}\r\n"
|
|
670
671
|
end
|
|
671
672
|
else
|
|
@@ -767,6 +768,7 @@ module Puma
|
|
|
767
768
|
headers.each do |k, vs|
|
|
768
769
|
case k.downcase
|
|
769
770
|
when CONTENT_LENGTH2
|
|
771
|
+
next if possible_header_injection?(vs)
|
|
770
772
|
content_length = vs
|
|
771
773
|
next
|
|
772
774
|
when TRANSFER_ENCODING
|
|
@@ -779,6 +781,7 @@ module Puma
|
|
|
779
781
|
|
|
780
782
|
if vs.respond_to?(:to_s) && !vs.to_s.empty?
|
|
781
783
|
vs.to_s.split(NEWLINE).each do |v|
|
|
784
|
+
next if possible_header_injection?(v)
|
|
782
785
|
lines.append k, colon, v, line_ending
|
|
783
786
|
end
|
|
784
787
|
else
|
|
@@ -1049,5 +1052,10 @@ module Puma
|
|
|
1049
1052
|
def shutting_down?
|
|
1050
1053
|
@status == :stop || @status == :restart
|
|
1051
1054
|
end
|
|
1055
|
+
|
|
1056
|
+
def possible_header_injection?(header_value)
|
|
1057
|
+
HTTP_INJECTION_REGEX =~ header_value.to_s
|
|
1058
|
+
end
|
|
1059
|
+
private :possible_header_injection?
|
|
1052
1060
|
end
|
|
1053
1061
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab-puma
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.3.
|
|
4
|
+
version: 4.3.3.gitlab.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2020-03-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nio4r
|