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