Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.3.11, backport 5.6.2 #2822

Merged
merged 1 commit into from Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions History.md
@@ -1,3 +1,8 @@
## 4.3.11 / 2022-02-11

* Security
* Always close the response body (GHSA-rmj8-8hhh-gv5h)

## 4.3.10 / 2021-10-12

* Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion lib/puma/const.rb
Expand Up @@ -100,7 +100,7 @@ class UnsupportedOption < RuntimeError
# too taxing on performance.
module Const

PUMA_VERSION = VERSION = "4.3.10".freeze
PUMA_VERSION = VERSION = "4.3.11".freeze
CODE_NAME = "Mysterious Traveller".freeze
PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze

Expand Down
11 changes: 7 additions & 4 deletions lib/puma/server.rb
Expand Up @@ -873,11 +873,14 @@ def handle_request(req, lines)
end

ensure
uncork_socket client
begin
uncork_socket client

body.close
req.tempfile.unlink if req.tempfile
res_body.close if res_body.respond_to? :close
body.close
req.tempfile.unlink if req.tempfile
ensure
res_body.close if res_body.respond_to? :close
end

after_reply.each { |o| o.call }
end
Expand Down