mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Fix access to arbitrary .png files on ruby 1.8
This commit is contained in:
parent
6ce8a94005
commit
e727b17930
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue