core.rb
find
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.0.1/lib/active_record/core.rb
in
find
key = primary_key
statement = cached_find_by_statement(key) { |params|
where(key => params.bind).limit(1)
}
record = statement.execute([id], self, connection).first
unless record
raise RecordNotFound.new("Couldn't find #{name} with '#{primary_key}'=#{id}",
name, primary_key, id)
end
record
rescue RangeError
raise RecordNotFound.new("Couldn't find #{name} with an out of range value for '#{primary_key}'",
name, primary_key)
end
/var/www/vhosts/autoker.hu/httpdocs/app/helpers/default.rb
in
get_project_by_type
elsif project_type == 'commercial'
project = CommercialBuilding.find(project_id)
elsif project_type == 'cproj'
project = CommercialProject.find(project_id)
elsif project_type == 'logistic'
project = LogisticPark.find(project_id)
elsif project_type == 'logistic_project'
project = LogisticProject.find(project_id)
elsif project_type == 'parking'
project = ParkingProject.find(project_id)
end
return project
end
def get_project_type_by_class(project_class)
/var/www/vhosts/autoker.hu/httpdocs/app/controllers/default.rb
in
block in <top (required)>
get '/news/:id/?' do
@item = NewsItem.find_by_id(params[:id]);
redirect to('/news') unless @item
erb :'pages/news_item'
end
get '/project' do
project = get_project_by_type(params[:project_type], params[:project_id])
redirect to('/') unless project
redirect to('/residential/' + params[:project_id]) if project.class.name == 'ResidentialProject'
redirect to('/commercial/' + params[:project_id]) if project.class.name == 'CommercialBuilding'
#redirect to('/commercial_project/' + params[:project_id]) if project.class.name == 'CommercialProject'
redirect to('/logistics/' + params[:project_id]) if project.class.name == 'LogisticPark'
redirect to('/logistic_project/' + params[:project_id]) if project.class.name == 'LogisticProject'
redirect to('/parking/' + params[:project_id]) if project.class.name == 'ParkingProject'
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
call
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
pattern, keys = compile path
conditions, @conditions = @conditions, []
wrapper = block.arity != 0 ?
proc { |a,p| unbound_method.bind(a).call(*p) } :
proc { |a,p| unbound_method.bind(a).call }
wrapper.instance_variable_set(:@route_name, method_name)
[ pattern, keys, conditions, wrapper ]
end
def compile(path)
if path.respond_to? :to_str
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block in compile!
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
pattern, keys = compile path
conditions, @conditions = @conditions, []
wrapper = block.arity != 0 ?
proc { |a,p| unbound_method.bind(a).call(*p) } :
proc { |a,p| unbound_method.bind(a).call }
wrapper.instance_variable_set(:@route_name, method_name)
[ pattern, keys, conditions, wrapper ]
end
def compile(path)
if path.respond_to? :to_str
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block (3 levels) 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, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/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.
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block (2 levels) 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, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block in process_route
if values.any?
original, @params = params, params.merge('splat' => [], 'captures' => values)
keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
ensure
@params = original if original
end
# No matching route was found or all routes passed. The default
# implementation is to forward the request downstream when running
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
catch
values += match.captures.map! { |v| force_encoding URI_INSTANCE.unescape(v) if v }
if values.any?
original, @params = params, params.merge('splat' => [], 'captures' => values)
keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
ensure
@params = original if original
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
process_route
values += match.captures.map! { |v| force_encoding URI_INSTANCE.unescape(v) if v }
if values.any?
original, @params = params, params.merge('splat' => [], 'captures' => values)
keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
ensure
@params = original if original
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block in route!
base.filters[type].each { |args| process_route(*args) }
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, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
each
filter! type, base.superclass if base.superclass.respond_to?(:filters)
base.filters[type].each { |args| process_route(*args) }
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, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
route!
filter! type, base.superclass if base.superclass.respond_to?(:filters)
base.filters[type].each { |args| process_route(*args) }
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, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block in dispatch!
end
# Dispatch a request with error handling.
def dispatch!
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before
route!
end
rescue ::Exception => boom
invoke { handle_exception!(boom) }
ensure
begin
filter! :after unless env['sinatra.static_file']
rescue ::Exception => boom
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block in invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
catch
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
dispatch!
body res
end
nil # avoid double setting the same response tuple twice
end
# Dispatch a request with error handling.
def dispatch!
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before
route!
end
rescue ::Exception => boom
invoke { handle_exception!(boom) }
ensure
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block in call!
@request = Request.new(env)
@response = Response.new
@params = indifferent_params(@request.params)
template_cache.clear if settings.reload_templates
force_encoding(@params)
@response['Content-Type'] = nil
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body and body[0].respond_to? :content_type
content_type body[0].content_type
else
content_type :html
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
block in invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
catch
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
call!
@request = Request.new(env)
@response = Response.new
@params = indifferent_params(@request.params)
template_cache.clear if settings.reload_templates
force_encoding(@params)
@response['Content-Type'] = nil
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body and body[0].respond_to? :content_type
content_type body[0].content_type
else
content_type :html
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
call
@app = app
@template_cache = Tilt::Cache.new
yield self if block_given?
end
# Rack call interface.
def call(env)
dup.call!(env)
end
def call!(env) # :nodoc:
@env = env
@request = Request.new(env)
@response = Response.new
@params = indifferent_params(@request.params)
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb
in
call
# Array prototype has been patched to track data. Checks the referrer
# even on GET requests if the content type is JSON.
class JsonCsrf < Base
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(env) or [status, headers, body]
else
[status, headers, body]
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb
in
context
def call(env)
context(env)
end
def context(env, app=@app)
prepare_session(env)
status, headers, body = app.call(env)
commit_session(env, status, headers, body)
end
private
def initialize_sid
@sidbits = @default_options[:sidbits]
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb
in
call
@default_options = self.class::DEFAULT_OPTIONS.merge(options)
@key = @default_options.delete(:key)
@cookie_only = @default_options.delete(:cookie_only)
initialize_sid
end
def call(env)
context(env)
end
def context(env, app=@app)
prepare_session(env)
status, headers, body = app.call(env)
commit_session(env, status, headers, body)
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-contrib-1.4.0/lib/rack/contrib/post_body_content_type_parser.rb
in
call
end
def call(env)
if Rack::Request.new(env).media_type == APPLICATION_JSON && (body = env[POST_BODY].read).length != 0
env[POST_BODY].rewind # somebody might try to read this stream
env.update(FORM_HASH => JSON.parse(body, :create_additions => false), FORM_INPUT => env[POST_BODY])
end
@app.call(env)
end
end
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/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)
if path.respond_to?(:encoding)
# Ruby 1.9+ M17N
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb
in
call
# Array prototype has been patched to track data. Checks the referrer
# even on GET requests if the content type is JSON.
class JsonCsrf < Base
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(env) or [status, headers, body]
else
[status, headers, body]
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb
in
context
def call(env)
context(env)
end
def context(env, app=@app)
prepare_session(env)
status, headers, body = app.call(env)
commit_session(env, status, headers, body)
end
private
def initialize_sid
@sidbits = @default_options[:sidbits]
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb
in
call
@default_options = self.class::DEFAULT_OPTIONS.merge(options)
@key = @default_options.delete(:key)
@cookie_only = @default_options.delete(:cookie_only)
initialize_sid
end
def call(env)
context(env)
end
def context(env, app=@app)
prepare_session(env)
status, headers, body = app.call(env)
commit_session(env, status, headers, body)
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/logger.rb
in
call
end
def call(env)
logger = ::Logger.new(env['rack.errors'])
logger.level = @level
env['rack.logger'] = logger
@app.call(env)
end
end
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/commonlogger.rb
in
call
def initialize(app, logger=nil)
@app = app
@logger = logger
end
def call(env)
began_at = Time.now
status, header, body = @app.call(env)
header = Utils::HeaderHash.new(header)
body = BodyProxy.new(body) { log(env, status, header, began_at) }
[status, header, body]
end
private
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/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 NotFound < NameError #:nodoc:
def http_status; 404 end
end
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
call
end
end
# Behaves exactly like Rack::CommonLogger with the notable exception that it does nothing,
# if another CommonLogger is already in the middleware chain.
class CommonLogger < Rack::CommonLogger
def call(env)
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)
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/head.rb
in
call
# Rack::Head returns an empty body for all HEAD requests. It leaves
# all other requests unchanged.
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
]
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/methodoverride.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]
method.to_s.upcase
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/show_exceptions.rb
in
call
def initialize(app)
@app = app
@template = ERB.new(TEMPLATE)
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"
exception = dump_exception(e)
else
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/lib/sinatra/base.rb
in
call
# Some Rack handlers (Thin, 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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/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
/var/www/vhosts/autoker.hu/httpdocs/vendor/bundle/ruby/2.3.0/gems/sinatra-1.4.7/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
/usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb
in
process_request
env[HTTP_VERSION] = HTTP_1_1
# Rails somehow modifies env['REQUEST_METHOD'], so we perform the comparison
# before the Rack application object is called.
is_head_request = env[REQUEST_METHOD] == HEAD
begin
status, headers, body = @app.call(env)
rescue => e
if !should_swallow_app_error?(e, socket_wrapper)
# It's a good idea to catch application exceptions here because
# otherwise maliciously crafted responses can crash the app,
# forcing it to be respawned, and thereby effectively DoSing it.
print_exception("Rack application object", e)
end
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb
in
accept_and_process_next_request
channel.io = connection
headers = parse_request(connection, channel, buffer)
end
if headers
prepare_request(connection, headers)
begin
if headers[REQUEST_METHOD] == GET
process_request(headers, connection, socket_wrapper, @protocol == :http)
elsif headers[REQUEST_METHOD] == PING
process_ping(headers, connection)
false
elsif headers[REQUEST_METHOD] == OOBW
process_oobw(headers, connection)
false
else
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb
in
main_loop
channel = MessageChannel.new
buffer = ''
buffer.force_encoding('binary') if buffer.respond_to?(:force_encoding)
begin
finish_callback.call
while true
hijacked = accept_and_process_next_request(socket_wrapper, channel, buffer)
socket_wrapper = Utils::UnseekableSocket.new if hijacked
end
rescue Interrupted
# Do nothing.
end
debug("Thread handler main loop exited normally")
ensure
/usr/share/passenger/phusion_passenger/request_handler.rb
in
block (3 levels) in start_threads
@threads_mutex.synchronize do
@concurrency.times do |i|
thread = create_thread_and_abort_on_exception(i) do |number|
begin
Thread.current[:name] = "Worker #{number + 1}"
handler = thread_handler.new(self, main_socket_options)
handler.install
handler.main_loop(set_initialization_state_to_true)
ensure
set_initialization_state.call(false)
unregister_current_thread
end
end
@threads << thread
expected_nthreads += 1
/usr/share/passenger/phusion_passenger/utils.rb
in
block in create_thread_and_abort_on_exception
# This method requires 'thread' and 'ruby_core_enhancements'.
# If 'debug_logging' is loaded and included in the current module,
# it will use that for logging.
def create_thread_and_abort_on_exception(*args)
Thread.new do
Thread.current.abort_on_exception = true
begin
yield(*args)
rescue SystemExit
raise
rescue Exception => e
print_exception(nil, e)
exit(1)
end
end
Variable | Value |
---|---|
project_id | "19" |
project_type | "logistic_project" |
No POST data.
Variable | Value |
---|---|
HTTP_ACCEPT | */* |
HTTP_HOST | autoker.hu |
HTTP_USER_AGENT | claudebot |
HTTP_VERSION | HTTP/1.1 |
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY | 0 |
PASSENGER_CONNECT_PASSWORD | O99ekK4LPc5mYmfP |
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY | 0 |
PATH_INFO | /project |
QUERY_STRING | project_type=logistic_project&project_id=19 |
REMOTE_ADDR | 54.87.17.177 |
REMOTE_PORT | 39140 |
REQUEST_METHOD | GET |
REQUEST_URI | /project?project_type=logistic_project&project_id=19 |
SCRIPT_NAME | |
SERVER_NAME | autoker.hu |
SERVER_PORT | 80 |
SERVER_PROTOCOL | HTTP/1.1 |
SERVER_SOFTWARE | nginx/1.16.1 Phusion_Passenger/6.0.2 |
rack.errors | #<Object:0x00562aa3036528> |
rack.hijack | #<Proc:0x007f8778942148@/usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:84 (lambda)> |
rack.hijack? | true |
rack.input | #<PhusionPassenger::Utils::TeeInput:0x007f87789423c8 @len=0, @socket=#<PhusionPassenger::Utils::UnseekableSocket:0x00562aa2a72358 @socket=#<UNIXSocket:fd 11>, @simulate_eof=true>, @bytes_read=0, @tmp=#<StringIO:0x007f8778942378>> |
rack.logger | #<Logger:0x007f8778941fe0 @progname=nil, @level=1, @default_formatter=#<Logger::Formatter:0x007f8778941f90 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x007f8778941f40 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:/tmp/passenger.spawn.XXXXINhUVi/stdout_and_err>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x007f8778941f18>>> |
rack.multiprocess | true |
rack.multithread | false |
rack.request.cookie_hash | {} |
rack.request.query_hash | {"project_type"=>"logistic_project", "project_id"=>"19"} |
rack.request.query_string | project_type=logistic_project&project_id=19 |
rack.run_once | false |
rack.session | {"session_id"=>"b5fd45e89fb681779a2ea127175e4c8ad165afa9e10776b9ccf28d0d928c7e4a", "csrf"=>"3cdf99913ecf8f5ba03a51938116927b", "tracking"=>{"HTTP_USER_AGENT"=>"ec0660ee20674482e3fbf9df2da732a482688d77", "HTTP_ACCEPT_LANGUAGE"=>"da39a3ee5e6b4b0d3255bfef95601890afd80709"}} |
rack.session.options | {:path=>"/", :domain=>"localhost", :expire_after=>2592000, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :secret=>"cfcb07c066fd99e6394ebe61a3621a3bc71e414bd24037177f2b60692d372e96865d9b8a3995eab7b5754197df94d9e300bc2e0bb9c482a2ed9a3cd642e54464", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x00562aa2ad79d8>} |
rack.session.unpacked_cookie_data | {"session_id"=>"b5fd45e89fb681779a2ea127175e4c8ad165afa9e10776b9ccf28d0d928c7e4a"} |
rack.url_scheme | http |
rack.version | [1, 2] |
sinatra.accept | [#<Sinatra::Request::AcceptEntry:0x007f8778921a10 @entry="*/*", @type="*/*", @params={}, @q=1.0>] |
sinatra.commonlogger | true |
sinatra.error | #<ActiveRecord::RecordNotFound: Couldn't find LogisticProject with 'id'=19> |
sinatra.route | GET /project |
You're seeing this error because you have
enabled the show_exceptions
setting.