Fix access to arbitrary .png files on ruby 1.8
This commit is contained in:
parent
6ce8a94005
commit
e727b17930
|
@ -1906,7 +1906,7 @@ module Sinatra
|
|||
|
||||
configure :development do
|
||||
get '/__sinatra__/:image.png' do
|
||||
filename = File.dirname(__FILE__) + "/images/#{params[:image]}.png"
|
||||
filename = File.dirname(__FILE__) + "/images/#{params[:image].to_i}.png"
|
||||
content_type :png
|
||||
send_file filename
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue