|
|
@ -997,7 +997,7 @@ def generate_captcha(key)
|
|
|
|
challenge = ""
|
|
|
|
challenge = ""
|
|
|
|
convert = Process.run(%(convert -density 1200 -resize 400x400 -background none svg:- png:-), shell: true, input: IO::Memory.new(clock_svg), output: Process::Redirect::Pipe) do |proc|
|
|
|
|
convert = Process.run(%(convert -density 1200 -resize 400x400 -background none svg:- png:-), shell: true, input: IO::Memory.new(clock_svg), output: Process::Redirect::Pipe) do |proc|
|
|
|
|
challenge = proc.output.gets_to_end
|
|
|
|
challenge = proc.output.gets_to_end
|
|
|
|
challenge = Base64.encode(challenge)
|
|
|
|
challenge = Base64.strict_encode(challenge)
|
|
|
|
challenge = "data:image/png;base64,#{challenge}"
|
|
|
|
challenge = "data:image/png;base64,#{challenge}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|