httpclient.rb
success_content
/home/geminabox/.gem/ruby/2.7.0/gems/httpclient-2.8.3/lib/httpclient.rb
in
success_content
raise BadResponseError.new("retry count exceeded", res)
end
def success_content(res)
if res.ok?
return res.content
else
raise BadResponseError.new("unexpected response: #{res.header.inspect}", res)
end
end
def protect_keep_alive_disconnected
begin
yield
rescue KeepAliveDisconnected
/home/geminabox/.gem/ruby/2.7.0/gems/httpclient-2.8.3/lib/httpclient.rb
in
get_content
# redirect_uri_callback= how HTTP redirection is handled.
#
# If you need to get full HTTP response including HTTP status and headers,
# use get method. get returns HTTP::Message as a response and you need to
# follow HTTP redirect by yourself if you need.
def get_content(uri, *args, &block)
query, header = keyword_argument(args, :query, :header)
success_content(follow_redirect(:get, uri, query, nil, header || {}, &block))
end
# Posts a content.
#
# uri:: a String or an URI object which represents an URL of web resource.
# body:: a Hash or an Array of body part. e.g.
# { "a" => "b" } => 'a=b'
/home/geminabox/.gem/ruby/2.7.0/gems/geminabox-2.1.0/lib/geminabox/http_adapter/http_client_adapter.rb
in
get_content
class HttpClientAdapter < HttpAdapter
def get(*args)
http_client.get(*args)
end
def get_content(*args)
http_client.get_content(*args)
end
def post(*args)
http_client.post(*args)
end
def set_auth(url, username = nil, password = nil)
/home/geminabox/.gem/ruby/2.7.0/gems/geminabox-2.1.0/lib/geminabox/rubygems_dependency.rb
in
for
def for(*gems)
url = [
rubygems_uri,
'?gems=',
gems.map(&:to_s).join(',')
].join
body = Geminabox.http_adapter.get_content(url)
Marshal.load(body)
rescue Exception => e
return [] if Geminabox.allow_remote_failure
raise e
end
def rubygems_uri
/home/geminabox/.gem/ruby/2.7.0/gems/geminabox-2.1.0/lib/geminabox/server.rb
in
remote_gem_list
end
def local_gem_list
query_gems.map{|query_gem| gem_dependencies(query_gem) }.flatten(1)
end
def remote_gem_list
RubygemsDependency.for(*query_gems)
end
def combined_gem_list
GemListMerge.merge(local_gem_list, remote_gem_list, strategy: Geminabox.rubygems_proxy_merge_strategy)
end
helpers do
/home/geminabox/.gem/ruby/2.7.0/gems/geminabox-2.1.0/lib/geminabox/server.rb
in
combined_gem_list
end
def remote_gem_list
RubygemsDependency.for(*query_gems)
end
def combined_gem_list
GemListMerge.merge(local_gem_list, remote_gem_list, strategy: Geminabox.rubygems_proxy_merge_strategy)
end
helpers do
def href(text)
if text && (text.start_with?('http://') || text.start_with?('https://'))
Rack::Utils.escape_html(text)
else
/home/geminabox/.gem/ruby/2.7.0/gems/geminabox-2.1.0/lib/geminabox/server.rb
in
gem_list
end
def index_gems(gems)
Set.new(gems.map{|gem| gem.name[0..0].downcase})
end
def gem_list
Geminabox.rubygems_proxy ? combined_gem_list : local_gem_list
end
def query_gems
params[:gems].to_s.split(',')
end
def local_gem_list
/home/geminabox/.gem/ruby/2.7.0/gems/geminabox-2.1.0/lib/geminabox/server.rb
in
block in <class:Server>
get '/atom.xml' do
@gems = load_gems
erb :atom, :layout => false
end
get '/api/v1/dependencies' do
query_gems.any? ? Marshal.dump(gem_list) : 200
end
get '/api/v1/dependencies.json' do
query_gems.any? ? gem_list.to_json : {}
end
get '/upload' do
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
pattern = compile(path, route_mustermann_opts)
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
conditions, @conditions = @conditions, []
wrapper = block.arity != 0 ?
proc { |a, p| unbound_method.bind(a).call(*p) } :
proc { |a, p| unbound_method.bind(a).call }
[ pattern, conditions, wrapper ]
end
def compile(path, route_mustermann_opts = {})
Mustermann.new(path, **mustermann_opts.merge(route_mustermann_opts))
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in compile!
pattern = compile(path, route_mustermann_opts)
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
conditions, @conditions = @conditions, []
wrapper = block.arity != 0 ?
proc { |a, p| unbound_method.bind(a).call(*p) } :
proc { |a, p| unbound_method.bind(a).call }
[ pattern, conditions, wrapper ]
end
def compile(path, route_mustermann_opts = {})
Mustermann.new(path, **mustermann_opts.merge(route_mustermann_opts))
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block (3 levels) in route!
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
route_eval
route_eval(&pass_block) if pass_block
route_missing
end
# Run a route block and throw :halt with the result.
def route_eval
throw :halt, yield
end
# If the current request matches pattern and conditions, fill params
# with keys and call the given block.
# Revert params afterwards.
#
# Returns pass block.
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block (2 levels) in route!
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in process_route
@params[:captures] = force_encoding(captures) unless captures.nil? || captures.empty?
else
values += params.values.flatten
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
rescue
@env['sinatra.error.params'] = @params
raise
ensure
params ||= {}
params.each { |k, _| @params.delete(k) } unless @env['sinatra.error.params']
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
catch
captures = pattern.match(route).captures.map { |c| URI_INSTANCE.unescape(c) if c }
values += captures
@params[:captures] = force_encoding(captures) unless captures.nil? || captures.empty?
else
values += params.values.flatten
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
rescue
@env['sinatra.error.params'] = @params
raise
ensure
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
process_route
captures = pattern.match(route).captures.map { |c| URI_INSTANCE.unescape(c) if c }
values += captures
@params[:captures] = force_encoding(captures) unless captures.nil? || captures.empty?
else
values += params.values.flatten
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
rescue
@env['sinatra.error.params'] = @params
raise
ensure
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in route!
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
each
block.call(result) if block_given?
end
end
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
route!
block.call(result) if block_given?
end
end
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in dispatch!
end
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before do
@pinned_response = !response['Content-Type'].nil?
end
route!
end
rescue ::Exception => boom
invoke { handle_exception!(boom) }
ensure
begin
filter! :after unless env['sinatra.static_file']
rescue ::Exception => boom
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
catch
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
dispatch!
# Avoid passing frozen string in force_encoding
@params.merge!(@request.params).each do |key, val|
next unless val.respond_to?(:force_encoding)
val = val.dup if val.frozen?
@params[key] = force_encoding(val)
end
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before do
@pinned_response = !response['Content-Type'].nil?
end
route!
end
rescue ::Exception => boom
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in call!
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
@pinned_response = nil
template_cache.clear if settings.reload_templates
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body && body[0].respond_to?(:content_type)
content_type body[0].content_type
elsif default = settings.default_content_type
content_type default
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
catch
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call!
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
@pinned_response = nil
template_cache.clear if settings.reload_templates
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body && body[0].respond_to?(:content_type)
content_type body[0].content_type
elsif default = settings.default_content_type
content_type default
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
@template_cache = Tilt::Cache.new
@pinned_response = nil # whether a before! filter pinned the content-type
yield self if block_given?
end
# Rack call interface.
def call(env)
dup.call!(env)
end
def call!(env) # :nodoc:
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
forward
def pass(&block)
throw :pass, block
end
# Forward the request to the downstream app -- middleware only.
def forward
fail "downstream app not set" unless @app.respond_to? :call
status, headers, body = @app.call env
@response.status = status
@response.body = body
@response.headers.merge! headers
nil
end
private
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
route_missing
# No matching route was found or all routes passed. The default
# implementation is to forward the request downstream when running
# as middleware (@app is non-nil); when no downstream app is set, raise
# a NotFound exception. Subclasses can override this method to perform
# custom route miss logic.
def route_missing
if @app
forward
else
raise NotFound, "#{request.request_method} #{request.path_info}"
end
end
# Attempt to serve static files from public directory. Throws :halt when
# a matching file is found, returns nil otherwise.
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
route!
# Run routes defined in superclass.
if base.superclass.respond_to?(:routes)
return route!(base.superclass, pass_block)
end
route_eval(&pass_block) if pass_block
route_missing
end
# Run a route block and throw :halt with the result.
def route_eval
throw :halt, yield
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
route!
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
# Run routes defined in superclass.
if base.superclass.respond_to?(:routes)
return route!(base.superclass, pass_block)
end
route_eval(&pass_block) if pass_block
route_missing
end
# Run a route block and throw :halt with the result.
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in dispatch!
end
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before do
@pinned_response = !response['Content-Type'].nil?
end
route!
end
rescue ::Exception => boom
invoke { handle_exception!(boom) }
ensure
begin
filter! :after unless env['sinatra.static_file']
rescue ::Exception => boom
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
catch
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
dispatch!
# Avoid passing frozen string in force_encoding
@params.merge!(@request.params).each do |key, val|
next unless val.respond_to?(:force_encoding)
val = val.dup if val.frozen?
@params[key] = force_encoding(val)
end
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before do
@pinned_response = !response['Content-Type'].nil?
end
route!
end
rescue ::Exception => boom
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in call!
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
@pinned_response = nil
template_cache.clear if settings.reload_templates
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body && body[0].respond_to?(:content_type)
content_type body[0].content_type
elsif default = settings.default_content_type
content_type default
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
catch
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(:disposition => nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Integer === res or String === res
if Array === res and Integer === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call!
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
@pinned_response = nil
template_cache.clear if settings.reload_templates
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body && body[0].respond_to?(:content_type)
content_type body[0].content_type
elsif default = settings.default_content_type
content_type default
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
@template_cache = Tilt::Cache.new
@pinned_response = nil # whether a before! filter pinned the content-type
yield self if block_given?
end
# Rack call interface.
def call(env)
dup.call!(env)
end
def call!(env) # :nodoc:
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/xss_header.rb
in
call
#
# Options:
# xss_mode:: How the browser should prevent the attack (default: :block)
class XSSHeader < Base
default_options :xss_mode => :block, :nosniff => true
def call(env)
status, headers, body = @app.call(env)
headers['X-XSS-Protection'] ||= "1; mode=#{options[:xss_mode]}" if html? headers
headers['X-Content-Type-Options'] ||= 'nosniff' if options[:nosniff]
[status, headers, body]
end
end
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/path_traversal.rb
in
call
#
# Unescapes '/' and '.', expands +path_info+.
# Thus <tt>GET /foo/%2e%2e%2fbar</tt> becomes <tt>GET /bar</tt>.
class PathTraversal < Base
def call(env)
path_was = env["PATH_INFO"]
env["PATH_INFO"] = cleanup path_was if path_was && !path_was.empty?
app.call env
ensure
env["PATH_INFO"] = path_was
end
def cleanup(path)
encoding = path.encoding
dot = '.'.encode(encoding)
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/json_csrf.rb
in
call
class JsonCsrf < Base
default_options :allow_if => nil
alias react deny
def call(env)
request = Request.new(env)
status, headers, body = app.call(env)
if has_vector?(request, headers)
warn env, "attack prevented by #{self.class}"
react_and_close(env, body) or [status, headers, body]
else
[status, headers, body]
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if Array === result and result.size == 3
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if Array === result and result.size == 3
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/frame_options.rb
in
call
frame_options = options[:frame_options]
frame_options = options[:frame_options].to_s.upcase unless frame_options.respond_to? :to_str
frame_options.to_str
end
end
def call(env)
status, headers, body = @app.call(env)
headers['X-Frame-Options'] ||= frame_options if html? headers
[status, headers, body]
end
end
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/null_logger.rb
in
call
class NullLogger
def initialize(app)
@app = app
end
def call(env)
env[RACK_LOGGER] = self
@app.call(env)
end
def info(progname = nil, &block); end
def debug(progname = nil, &block); end
def warn(progname = nil, &block); end
def error(progname = nil, &block); end
def fatal(progname = nil, &block); end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/head.rb
in
call
# all other requests unchanged.
class Head
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
if env[REQUEST_METHOD] == HEAD
[
status, headers, Rack::BodyProxy.new([]) do
body.close if body.respond_to? :close
end
]
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/show_exceptions.rb
in
call
def @@eats_errors.puts(*) end
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
rescue Exception => e
errors, env["rack.errors"] = env["rack.errors"], @@eats_errors
if prefers_plain_text?(env)
content_type = "text/plain"
body = dump_exception(e)
else
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
# Some Rack handlers (Rainbows!) implement an extended body object protocol, however,
# some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
# This middleware will detect an extended body object and will make sure it reaches the
# handler directly. We do this here, so our middleware and middleware set up by the app will
# still be able to run.
class ExtendedRack < Struct.new(:app)
def call(env)
result, callback = app.call(env), env['async.callback']
return result unless callback and async?(*result)
after_response { callback.call result }
setup_close(env, *result)
throw :async
end
private
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
end
def helpers
@instance
end
def call(env)
@stack.call(env)
end
def inspect
"#<#{@instance.class} app_file=#{settings.app_file.inspect}>"
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/xss_header.rb
in
call
#
# Options:
# xss_mode:: How the browser should prevent the attack (default: :block)
class XSSHeader < Base
default_options :xss_mode => :block, :nosniff => true
def call(env)
status, headers, body = @app.call(env)
headers['X-XSS-Protection'] ||= "1; mode=#{options[:xss_mode]}" if html? headers
headers['X-Content-Type-Options'] ||= 'nosniff' if options[:nosniff]
[status, headers, body]
end
end
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/path_traversal.rb
in
call
#
# Unescapes '/' and '.', expands +path_info+.
# Thus <tt>GET /foo/%2e%2e%2fbar</tt> becomes <tt>GET /bar</tt>.
class PathTraversal < Base
def call(env)
path_was = env["PATH_INFO"]
env["PATH_INFO"] = cleanup path_was if path_was && !path_was.empty?
app.call env
ensure
env["PATH_INFO"] = path_was
end
def cleanup(path)
encoding = path.encoding
dot = '.'.encode(encoding)
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/json_csrf.rb
in
call
class JsonCsrf < Base
default_options :allow_if => nil
alias react deny
def call(env)
request = Request.new(env)
status, headers, body = app.call(env)
if has_vector?(request, headers)
warn env, "attack prevented by #{self.class}"
react_and_close(env, body) or [status, headers, body]
else
[status, headers, body]
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if Array === result and result.size == 3
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if Array === result and result.size == 3
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-protection-2.2.4/lib/rack/protection/frame_options.rb
in
call
frame_options = options[:frame_options]
frame_options = options[:frame_options].to_s.upcase unless frame_options.respond_to? :to_str
frame_options.to_str
end
end
def call(env)
status, headers, body = @app.call(env)
headers['X-Frame-Options'] ||= frame_options if html? headers
[status, headers, body]
end
end
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/null_logger.rb
in
call
class NullLogger
def initialize(app)
@app = app
end
def call(env)
env[RACK_LOGGER] = self
@app.call(env)
end
def info(progname = nil, &block); end
def debug(progname = nil, &block); end
def warn(progname = nil, &block); end
def error(progname = nil, &block); end
def fatal(progname = nil, &block); end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/head.rb
in
call
# all other requests unchanged.
class Head
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
if env[REQUEST_METHOD] == HEAD
[
status, headers, Rack::BodyProxy.new([]) do
body.close if body.respond_to? :close
end
]
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/method_override.rb
in
call
method = method_override(env)
if HTTP_METHODS.include?(method)
env[RACK_METHODOVERRIDE_ORIGINAL_METHOD] = env[REQUEST_METHOD]
env[REQUEST_METHOD] = method
end
end
@app.call(env)
end
def method_override(env)
req = Request.new(env)
method = method_override_param(req) ||
env[HTTP_METHOD_OVERRIDE_HEADER]
begin
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/show_exceptions.rb
in
call
def @@eats_errors.puts(*) end
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
rescue Exception => e
errors, env["rack.errors"] = env["rack.errors"], @@eats_errors
if prefers_plain_text?(env)
content_type = "text/plain"
body = dump_exception(e)
else
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
# Some Rack handlers (Rainbows!) implement an extended body object protocol, however,
# some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
# This middleware will detect an extended body object and will make sure it reaches the
# handler directly. We do this here, so our middleware and middleware set up by the app will
# still be able to run.
class ExtendedRack < Struct.new(:app)
def call(env)
result, callback = app.call(env), env['async.callback']
return result unless callback and async?(*result)
after_response { callback.call result }
setup_close(env, *result)
throw :async
end
private
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
end
def helpers
@instance
end
def call(env)
@stack.call(env)
end
def inspect
"#<#{@instance.class} app_file=#{settings.app_file.inspect}>"
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
block in call
setup_default_middleware builder
setup_middleware builder
builder.run app
builder
end
def call(env)
synchronize { prototype.call(env) }
end
# Like Kernel#caller but excluding certain magic entries and without
# line / method information; the resulting array contains filenames only.
def caller_files
cleaned_caller(1).flatten
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
synchronize
end
@@mutex = Mutex.new
def synchronize(&block)
if lock?
@@mutex.synchronize(&block)
else
yield
end
end
# used for deprecation warnings
def warn(message)
super message + "\n\tfrom #{cleaned_caller.first.join(':')}"
end
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
setup_default_middleware builder
setup_middleware builder
builder.run app
builder
end
def call(env)
synchronize { prototype.call(env) }
end
# Like Kernel#caller but excluding certain magic entries and without
# line / method information; the resulting array contains filenames only.
def caller_files
cleaned_caller(1).flatten
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/tempfile_reaper.rb
in
call
class TempfileReaper
def initialize(app)
@app = app
end
def call(env)
env[RACK_TEMPFILES] ||= []
status, headers, body = @app.call(env)
body_proxy = BodyProxy.new(body) do
env[RACK_TEMPFILES].each(&:close!) unless env[RACK_TEMPFILES].nil?
end
[status, headers, body_proxy]
end
end
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/lint.rb
in
_call
assert("No env given") { env }
check_env env
env[RACK_INPUT] = InputWrapper.new(env[RACK_INPUT])
env[RACK_ERRORS] = ErrorWrapper.new(env[RACK_ERRORS])
## and returns an Array of exactly three values:
ary = @app.call(env)
assert("response is not an Array, but #{ary.class}") {
ary.kind_of? Array
}
assert("response array has #{ary.size} elements instead of 3") {
ary.size == 3
}
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/lint.rb
in
call
## after to catch all mistakes.
## = Rack applications
## A Rack application is a Ruby object (not a class) that
## responds to +call+.
def call(env = nil)
dup._call(env)
end
def _call(env)
## It takes exactly one argument, the *environment*
assert("No env given") { env }
check_env env
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/show_exceptions.rb
in
call
CONTEXT = 7
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
rescue StandardError, LoadError, SyntaxError => e
exception_string = dump_exception(e)
env[RACK_ERRORS].puts(exception_string)
env[RACK_ERRORS].flush
if accepts_html?(env)
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/common_logger.rb
in
call
# will not be logged, so if exception handling middleware are used,
# they should be loaded after this middleware. Additionally, because
# the logging happens after the request body has been fully sent, any
# exceptions raised during the sending of the response body will
# cause the request not to be logged.
def call(env)
began_at = Utils.clock_time
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
body = BodyProxy.new(body) { log(env, status, headers, began_at) }
[status, headers, body]
end
private
/home/geminabox/.gem/ruby/2.7.0/gems/sinatra-2.2.4/lib/sinatra/base.rb
in
call
env['sinatra.commonlogger'] ? @app.call(env) : super
end
superclass.class_eval do
alias call_without_check call unless method_defined? :call_without_check
def call(env)
env['sinatra.commonlogger'] = true
call_without_check(env)
end
end
end
class BadRequest < TypeError #:nodoc:
def http_status; 400 end
end
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/chunked.rb
in
call
end
end
# If the rack app returns a response that should have a body,
# but does not have Content-Length or Transfer-Encoding headers,
# modify the response to use chunked Transfer-Encoding.
def call(env)
status, headers, body = @app.call(env)
headers = HeaderHash[headers]
if chunkable_version?(env[SERVER_PROTOCOL]) &&
!STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) &&
!headers[CONTENT_LENGTH] &&
!headers[TRANSFER_ENCODING]
/home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/content_length.rb
in
call
include Rack::Utils
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
headers = HeaderHash[headers]
if !STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) &&
!headers[CONTENT_LENGTH] &&
!headers[TRANSFER_ENCODING]
obody = body
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb
in
process_client
env["rack.early_hints"] = lambda do |headers|
e103_response_write(client, headers)
end
end
env["rack.after_reply"] = []
status, headers, body = @app.call(env)
begin
return if @request.hijacked?
if 100 == status.to_i
e100_response_write(client, env)
status, headers, body = @app.call(env)
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-worker-killer-0.4.5/lib/unicorn/worker_killer.rb
in
process_client
end
def randomize(integer)
RUBY_VERSION > "1.9" ? Random.rand(integer.abs) : rand(integer)
end
def process_client(client)
super(client) # Unicorn::HttpServer#process_client
return if @_worker_memory_limit_min == 0 && @_worker_memory_limit_max == 0
@_worker_process_start ||= Time.now
@_worker_memory_limit ||= @_worker_memory_limit_min + randomize(@_worker_memory_limit_max - @_worker_memory_limit_min + 1)
@_worker_check_count += 1
if @_worker_check_count % @_worker_check_cycle == 0
rss = GetProcessMem.new.bytes
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-worker-killer-0.4.5/lib/unicorn/worker_killer.rb
in
process_client
end
def randomize(integer)
RUBY_VERSION > "1.9" ? Random.rand(integer.abs) : rand(integer)
end
def process_client(client)
super(client) # Unicorn::HttpServer#process_client
return if @_worker_max_requests_min == 0 && @_worker_max_requests_max == 0
@_worker_process_start ||= Time.now
@_worker_cur_requests ||= @_worker_max_requests_min + randomize(@_worker_max_requests_max - @_worker_max_requests_min + 1)
@_worker_max_requests ||= @_worker_cur_requests
logger.info "#{self}: worker (pid: #{Process.pid}) has #{@_worker_cur_requests} left before being killed" if @_verbose
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb
in
worker_loop
begin
reopen = reopen_worker_logs(worker.nr) if reopen
worker.tick = time_now.to_i
while sock = ready.shift
# Unicorn::Worker#kgio_tryaccept is not like accept(2) at all,
# but that will return false
if client = sock.kgio_tryaccept
process_client(client)
worker.tick = time_now.to_i
end
break if reopen
end
# timeout so we can .tick and keep parent from SIGKILL-ing us
worker.tick = time_now.to_i
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb
in
spawn_missing_workers
worker = Unicorn::Worker.new(worker_nr)
before_fork.call(self, worker)
pid = @worker_exec ? worker_spawn(worker) : fork
unless pid
after_fork_internal
worker_loop(worker)
exit
end
@workers[pid] = worker
worker.atfork_parent
end
rescue => e
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb
in
maintain_worker_count
rescue => e
@logger.error(e) rescue nil
exit!
end
def maintain_worker_count
(off = @workers.size - worker_processes) == 0 and return
off < 0 and return spawn_missing_workers
@workers.each_value { |w| w.nr >= worker_processes and w.soft_kill(:QUIT) }
end
# if we get any error, try to write something back to the client
# assuming we haven't closed the socket, but don't get hung up
# if the socket is already closed or broken. We'll always ensure
# the socket is closed at the end of this function
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb
in
join
# machine) comes out of suspend/hibernation
if (last_check + @timeout) >= (last_check = time_now)
sleep_time = murder_lazy_workers
else
sleep_time = @timeout/2.0 + 1
@logger.debug("waiting #{sleep_time}s after suspend/hibernation")
end
maintain_worker_count if respawn
master_sleep(sleep_time)
when :QUIT # graceful shutdown
break
when :TERM, :INT # immediate shutdown
stop(false)
break
when :USR1 # rotate logs
/home/geminabox/.gem/ruby/2.7.0/gems/unicorn-6.1.0/bin/unicorn
in
<top (required)>
:unicorn_options => options,
:app => app,
:daemonize => rackup_opts[:daemonize],
})
end
Unicorn::Launcher.daemonize!(options) if rackup_opts[:daemonize]
Unicorn::HttpServer.new(app, options).start.join
/home/geminabox/.gem/ruby/2.7.0/bin/unicorn
in
load
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('unicorn', 'unicorn', version)
else
gem "unicorn", version
load Gem.bin_path("unicorn", "unicorn", version)
end
/home/geminabox/.gem/ruby/2.7.0/bin/unicorn
in
<main>
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('unicorn', 'unicorn', version)
else
gem "unicorn", version
load Gem.bin_path("unicorn", "unicorn", version)
end
Variable | Value |
---|---|
gems | "activesupport,aptly-api,bcrypt_pbkdf,bencode,chef-utils,ci_reporter_minitest,ci_reporter_test_unit,concurrent-ruby,deep_merge,docker-api,droplet_kit,ed25519,equivalent-xml,faraday,gir_ffi,git,git_clone_url,gitlab,htmlentities,insensitive_hash,jenkins_api_client,jenkins_junit_builder,logger-colors,minitest,mixlib-shellout,mocha,net-ftp-list,net-sftp,net-ssh,net-ssh-gateway,nokogiri,octokit,parallel_tests,rake,rake-notes,releaseme,rubocop,rubocop-checkstyle_formatter,ruby-progressbar,rugged,sigdump,simplecov,simplecov-rcov,test-unit,tty-command,tty-pager,tty-prompt,tty-spinner,uri-ssh_git,webrick" |
No POST data.
Variable | Value |
---|---|
HTTP_ACCEPT | */* |
HTTP_ACCEPT_ENCODING | gzip;q=1.0,deflate;q=0.6,identity;q=0.3 |
HTTP_CONNECTION | Keep-Alive |
HTTP_HOST | localhost |
HTTP_USER_AGENT | bundler/2.3.5 rubygems/3.3.5 ruby/3.0.2 (x86_64-pc-linux-gnu) command/install options/no_install 5069ddf80af49720 |
HTTP_VERSION | HTTP/1.1 |
HTTP_VIA | 1.1 gem.cache.pangea.pub |
HTTP_X_FORWARDED_FOR | 82.69.88.229 |
HTTP_X_FORWARDED_HOST | gem.cache.pangea.pub |
HTTP_X_FORWARDED_PORT | 443 |
HTTP_X_FORWARDED_PROTO | https |
HTTP_X_FORWARDED_SERVER | gem.cache.pangea.pub |
PATH_INFO | /api/v1/dependencies |
QUERY_STRING | gems=activesupport%2Captly-api%2Cbcrypt_pbkdf%2Cbencode%2Cchef-utils%2Cci_reporter_minitest%2Cci_reporter_test_unit%2Cconcurrent-ruby%2Cdeep_merge%2Cdocker-api%2Cdroplet_kit%2Ced25519%2Cequivalent-xml%2Cfaraday%2Cgir_ffi%2Cgit%2Cgit_clone_url%2Cgitlab%2Chtmlentities%2Cinsensitive_hash%2Cjenkins_api_client%2Cjenkins_junit_builder%2Clogger-colors%2Cminitest%2Cmixlib-shellout%2Cmocha%2Cnet-ftp-list%2Cnet-sftp%2Cnet-ssh%2Cnet-ssh-gateway%2Cnokogiri%2Coctokit%2Cparallel_tests%2Crake%2Crake-notes%2Creleaseme%2Crubocop%2Crubocop-checkstyle_formatter%2Cruby-progressbar%2Crugged%2Csigdump%2Csimplecov%2Csimplecov-rcov%2Ctest-unit%2Ctty-command%2Ctty-pager%2Ctty-prompt%2Ctty-spinner%2Curi-ssh_git%2Cwebrick |
REMOTE_ADDR | 127.0.0.1 |
REQUEST_METHOD | GET |
REQUEST_PATH | /api/v1/dependencies |
REQUEST_URI | /api/v1/dependencies?gems=activesupport%2Captly-api%2Cbcrypt_pbkdf%2Cbencode%2Cchef-utils%2Cci_reporter_minitest%2Cci_reporter_test_unit%2Cconcurrent-ruby%2Cdeep_merge%2Cdocker-api%2Cdroplet_kit%2Ced25519%2Cequivalent-xml%2Cfaraday%2Cgir_ffi%2Cgit%2Cgit_clone_url%2Cgitlab%2Chtmlentities%2Cinsensitive_hash%2Cjenkins_api_client%2Cjenkins_junit_builder%2Clogger-colors%2Cminitest%2Cmixlib-shellout%2Cmocha%2Cnet-ftp-list%2Cnet-sftp%2Cnet-ssh%2Cnet-ssh-gateway%2Cnokogiri%2Coctokit%2Cparallel_tests%2Crake%2Crake-notes%2Creleaseme%2Crubocop%2Crubocop-checkstyle_formatter%2Cruby-progressbar%2Crugged%2Csigdump%2Csimplecov%2Csimplecov-rcov%2Ctest-unit%2Ctty-command%2Ctty-pager%2Ctty-prompt%2Ctty-spinner%2Curi-ssh_git%2Cwebrick |
SCRIPT_NAME | |
SERVER_NAME | localhost |
SERVER_PORT | 443 |
SERVER_PROTOCOL | HTTP/1.1 |
SERVER_SOFTWARE | Unicorn 6.1.0 |
rack.after_reply | [] |
rack.errors | #<Object:0x000055f43e50d128> |
rack.hijack | #<Proc:0x000055f43ed0e890 /home/geminabox/.gem/ruby/2.7.0/gems/rack-2.2.7/lib/rack/lint.rb:567> |
rack.hijack? | true |
rack.input | #<Rack::Lint::InputWrapper:0x000055f43ed0e728 @input=#<StringIO:0x000055f43dfde058>> |
rack.logger | #<Rack::NullLogger:0x000055f43ed54e80 @app=#<Rack::Protection::FrameOptions:0x000055f43ed54f48 @app=#<Rack::Protection::HttpOrigin:0x000055f43ed55010 @app=#<Rack::Protection::IPSpoofing:0x000055f43ed550b0 @app=#<Rack::Protection::JsonCsrf:0x000055f43ed551c8 @app=#<Rack::Protection::PathTraversal:0x000055f43ed55268 @app=#<Rack::Protection::XSSHeader:0x000055f43ed55380 @app=#<Geminabox::Proxy::Hostess:0x000055f43e87f158 @default_layout=:layout, @preferred_extension=nil, @app=#<Geminabox::Server:0x000055f43e5a50b8 @default_layout=:layout, @preferred_extension=nil, @app=nil, @template_cache=#<Tilt::Cache:0x000055f43e5a4fc8 @cache={}>, @pinned_response=nil>, @template_cache=#<Tilt::Cache:0x000055f43e87f108 @cache={}>, @pinned_response=nil>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :xss_mode=>:block, :nosniff=>true, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :allow_if=>nil, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :allow_if=>nil, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :frame_options=>:sameorigin, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}, @frame_options="SAMEORIGIN">> |
rack.multiprocess | true |
rack.multithread | false |
rack.request.cookie_hash | {} |
rack.request.query_hash | {"gems"=>"activesupport,aptly-api,bcrypt_pbkdf,bencode,chef-utils,ci_reporter_minitest,ci_reporter_test_unit,concurrent-ruby,deep_merge,docker-api,droplet_kit,ed25519,equivalent-xml,faraday,gir_ffi,git,git_clone_url,gitlab,htmlentities,insensitive_hash,jenkins_api_client,jenkins_junit_builder,logger-colors,minitest,mixlib-shellout,mocha,net-ftp-list,net-sftp,net-ssh,net-ssh-gateway,nokogiri,octokit,parallel_tests,rake,rake-notes,releaseme,rubocop,rubocop-checkstyle_formatter,ruby-progressbar,rugged,sigdump,simplecov,simplecov-rcov,test-unit,tty-command,tty-pager,tty-prompt,tty-spinner,uri-ssh_git,webrick"} |
rack.request.query_string | gems=activesupport%2Captly-api%2Cbcrypt_pbkdf%2Cbencode%2Cchef-utils%2Cci_reporter_minitest%2Cci_reporter_test_unit%2Cconcurrent-ruby%2Cdeep_merge%2Cdocker-api%2Cdroplet_kit%2Ced25519%2Cequivalent-xml%2Cfaraday%2Cgir_ffi%2Cgit%2Cgit_clone_url%2Cgitlab%2Chtmlentities%2Cinsensitive_hash%2Cjenkins_api_client%2Cjenkins_junit_builder%2Clogger-colors%2Cminitest%2Cmixlib-shellout%2Cmocha%2Cnet-ftp-list%2Cnet-sftp%2Cnet-ssh%2Cnet-ssh-gateway%2Cnokogiri%2Coctokit%2Cparallel_tests%2Crake%2Crake-notes%2Creleaseme%2Crubocop%2Crubocop-checkstyle_formatter%2Cruby-progressbar%2Crugged%2Csigdump%2Csimplecov%2Csimplecov-rcov%2Ctest-unit%2Ctty-command%2Ctty-pager%2Ctty-prompt%2Ctty-spinner%2Curi-ssh_git%2Cwebrick |
rack.run_once | false |
rack.tempfiles | [] |
rack.url_scheme | https |
rack.version | [1, 2] |
sinatra.accept | [#<Sinatra::Request::AcceptEntry:0x000055f43ee34a08 @entry="*/*", @type="*/*", @params={}, @q=1.0>] |
sinatra.commonlogger | true |
sinatra.error | #<HTTPClient::BadResponseError: unexpected response: #<HTTP::Message::Headers:0x000055f43df8a188 @http_version="1.1", @body_size=0, @chunked=false, @request_method="GET", @request_uri=#<URI::HTTPS https://bundler.rubygems.org/api/v1/dependencies?gems=activesupport,aptly-api,bcrypt_pbkdf,bencode,chef-utils,ci_reporter_minitest,ci_reporter_test_unit,concurrent-ruby,deep_merge,docker-api,droplet_kit,ed25519,equivalent-xml,faraday,gir_ffi,git,git_clone_url,gitlab,htmlentities,insensitive_hash,jenkins_api_client,jenkins_junit_builder,logger-colors,minitest,mixlib-shellout,mocha,net-ftp-list,net-sftp,net-ssh,net-ssh-gateway,nokogiri,octokit,parallel_tests,rake,rake-notes,releaseme,rubocop,rubocop-checkstyle_formatter,ruby-progressbar,rugged,sigdump,simplecov,simplecov-rcov,test-unit,tty-command,tty-pager,tty-prompt,tty-spinner,uri-ssh_git,webrick>, @request_query=nil, @request_absolute_uri=nil, @status_code=404, @reason_phrase="Not Found", @body_type=nil, @body_charset=nil, @body_date=nil, @body_encoding=#<Encoding:UTF-8>, @is_request=false, @header_item=[["Connection", "keep-alive"], ["Content-Length", "132"], ["Content-Type", "application/octet-stream; charset=utf-8"], ["X-Frame-Options", "SAMEORIGIN"], ["X-XSS-Protection", "0"], ["X-Content-Type-Options", "nosniff"], ["X-Download-Options", "noopen"], ["X-Permitted-Cross-Domain-Policies", "none"], ["Referrer-Policy", "strict-origin-when-cross-origin"], ["Cache-Control", "max-age=30, public"], ["Content-Encoding", "gzip"], ["Content-Security-Policy", "default-src 'self'; font-src 'self' https://fonts.gstatic.com; img-src 'self' https://secure.gaug.es https://gravatar.com https://www.gravatar.com https://secure.gravatar.com https://*.fastly-insights.com https://avatars.githubusercontent.com; object-src 'none'; script-src 'self' https://secure.gaug.es https://www.fastly-insights.com 'nonce-'; style-src 'self' https://fonts.googleapis.com; connect-src 'self' https://s3-us-west-2.amazonaws.com/rubygems-dumps/ https://*.fastly-insights.com https://fastly-insights.com https://api.github.com http://localhost:*; form-action 'self' https://github.com/login/oauth/authorize; frame-ancestors 'self'; report-uri https://csp-report.browser-intake-datadoghq.com/api/v2/logs?dd-api-key=pub852fa3e2312391fafa5640b60784e660&dd-evp-origin=content-security-policy&ddsource=csp-report&ddtags=service%3Arubygems.org%2Cversion%3A146af3740941a790a743a2e699036f0d7137b99e%2Cenv%3Aproduction%2Ctrace_id%3A61598582752074663"], ["X-Request-Id", "bd61ec99-3428-4949-bd0d-8a7ea7fa358b"], ["X-Runtime", "0.006496"], ["Strict-Transport-Security", "max-age=31536000"], ["Accept-Ranges", "bytes"], ["Date", "Mon, 22 May 2023 15:27:42 GMT"], ["Via", "1.1 varnish"], ["Age", "81"], ["X-Served-By", "cache-fra-eddf8230043-FRA"], ["X-Cache", "HIT"], ["X-Cache-Hits", "1"], ["X-Timer", "S1684769263.828682,VS0,VE1"], ["Vary", "x-dependency-api-allowed,Accept-Encoding"], ["Server", "RubyGems.org"]], @dumped=false>> |
sinatra.error.params | {"gems"=>"activesupport,aptly-api,bcrypt_pbkdf,bencode,chef-utils,ci_reporter_minitest,ci_reporter_test_unit,concurrent-ruby,deep_merge,docker-api,droplet_kit,ed25519,equivalent-xml,faraday,gir_ffi,git,git_clone_url,gitlab,htmlentities,insensitive_hash,jenkins_api_client,jenkins_junit_builder,logger-colors,minitest,mixlib-shellout,mocha,net-ftp-list,net-sftp,net-ssh,net-ssh-gateway,nokogiri,octokit,parallel_tests,rake,rake-notes,releaseme,rubocop,rubocop-checkstyle_formatter,ruby-progressbar,rugged,sigdump,simplecov,simplecov-rcov,test-unit,tty-command,tty-pager,tty-prompt,tty-spinner,uri-ssh_git,webrick"} |
sinatra.route | GET /api/v1/dependencies |
unicorn.socket | #<Kgio::Socket:fd 7> |
You're seeing this error because you have
enabled the show_exceptions
setting.