-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request from GHSA-84j7-475p-hp8v
header value could inject a CR or LF and inject their own HTTP response.
- Loading branch information
1 parent
bb29fc7
commit 1b17e85
Showing
8 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# You are encouraged to use @ioquatix's wrk fork, located here: https://github.com/ioquatix/wrk | ||
|
||
bundle exec bin/puma -t 4 test/rackup/hello.ru & | ||
PID1=$! | ||
sleep 5 | ||
wrk -c 4 -d 30 --latency http://localhost:9292 | ||
|
||
kill $PID1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bundle exec bin/puma -t 4 test/rackup/many_long_headers.ru & | ||
PID1=$! | ||
sleep 5 | ||
wrk -c 4 -d 30 --latency http://localhost:9292 | ||
|
||
kill $PID1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bundle exec bin/puma -t 4 test/rackup/realistic_response.ru & | ||
PID1=$! | ||
sleep 5 | ||
wrk -c 4 -d 30 --latency http://localhost:9292 | ||
|
||
kill $PID1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'securerandom' | ||
|
||
long_header_hash = {} | ||
|
||
30.times do |i| | ||
long_header_hash["X-My-Header-#{i}"] = SecureRandom.hex(1000) | ||
end | ||
|
||
run lambda { |env| [200, long_header_hash, ["Hello World"]] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require 'securerandom' | ||
|
||
long_header_hash = {} | ||
|
||
25.times do |i| | ||
long_header_hash["X-My-Header-#{i}"] = SecureRandom.hex(25) | ||
end | ||
|
||
response = SecureRandom.hex(100_000) # A 100kb document | ||
|
||
run lambda { |env| [200, long_header_hash.dup, [response.dup]] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters