From 58003768186811e565415c69e79148ac66645949 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 24 Jul 2018 21:26:19 -0500 Subject: [PATCH] Fix clock CAPTCHA on iOS --- src/invidious/helpers.cr | 4 ++-- src/invidious/views/login.ecr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/invidious/helpers.cr b/src/invidious/helpers.cr index 05823764..105a1598 100644 --- a/src/invidious/helpers.cr +++ b/src/invidious/helpers.cr @@ -997,8 +997,8 @@ def generate_captcha(key) 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| challenge = proc.output.gets_to_end - challenge = Base64.encode(challenge) - challenge = "data:image/png; base64, #{challenge}" + challenge = Base64.strict_encode(challenge) + challenge = "data:image/png;base64,#{challenge}" end answer = "#{hour}:#{minute.to_s.rjust(2, '0')}" diff --git a/src/invidious/views/login.ecr b/src/invidious/views/login.ecr index b927e69a..1a2d826d 100644 --- a/src/invidious/views/login.ecr +++ b/src/invidious/views/login.ecr @@ -41,7 +41,7 @@ - +