Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa54f4d

Browse files
committed
Merge pull request #2269 from MSP-Greg/json-require
Load JSON at runtime
1 parent a24b51b commit fa54f4d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

History.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
* Bugfixes
77
* Your bugfix goes here (#Github Number)
88

9+
## 4.3.4/4.3.5 and 3.12.5/3.12.6 / 2020-05-22
10+
11+
Each patchlevel release contains a separate security fix. We recommend simply upgrading to 4.3.5/3.12.6.
912

1013
## 4.3.3 and 3.12.4 / 2020-02-28
1114
* Bugfixes

lib/puma/app/status.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'json'
4-
53
module Puma
64
module App
75
# Check out {#call}'s source code to see what actions this web application
@@ -19,6 +17,10 @@ def call(env)
1917
return rack_response(403, 'Invalid auth token', 'text/plain')
2018
end
2119

20+
if env['PATH_INFO'] =~ /\/(gc-stats|stats|thread-backtraces)$/
21+
require 'json'
22+
end
23+
2224
case env['PATH_INFO']
2325
when /\/stop$/
2426
@cli.stop

0 commit comments

Comments
 (0)