Fix vulnerable.
This commit is contained in:
parent
76646d0b43
commit
79dbca5d86
|
@ -7,9 +7,11 @@ module RuCaptcha
|
|||
if params[:format] == "wav" and RuCaptcha.espeak?
|
||||
data = generate_speech_rucaptcha
|
||||
opts = { disposition: 'inline', type: 'audio/wav' }
|
||||
else
|
||||
elsif params[:format].blank? || params[:format] == "gif"
|
||||
data = generate_rucaptcha
|
||||
opts = { disposition: 'inline', type: 'image/gif' }
|
||||
else
|
||||
render :body => nil, :status => 404 and return
|
||||
end
|
||||
send_data data, opts
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue