summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2019-02-10 12:27:33 -0600
committerOmar Roth <omarroth@hotmail.com>2019-02-10 12:27:33 -0600
commit8bbf351d04309680f3d9f425b49490c1d8bf2ecd (patch)
treec71474e19b183e8a2e4b46b377ca8e301c226ef5
parent27934dad379682fab59c2be39aac30914cd5a356 (diff)
downloadinvidious-8bbf351d04309680f3d9f425b49490c1d8bf2ecd.tar.gz
invidious-8bbf351d04309680f3d9f425b49490c1d8bf2ecd.tar.bz2
invidious-8bbf351d04309680f3d9f425b49490c1d8bf2ecd.zip
Fix challenge switching for Google login
-rw-r--r--src/invidious.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index b210fcc3..28d3fbf5 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -818,7 +818,7 @@ post "/login" do |env|
# Prefer Authenticator app and SMS over unsupported protocols
if challenge_results[0][-1][0][0][8] != 6 && challenge_results[0][-1][0][0][8] != 9
tfa = challenge_results[0][-1][0].as_a.select { |auth_type| auth_type[8] == 6 || auth_type[8] == 9 }[0]
- select_challenge = "[#{challenge_results[0][-1][0].as_a.index(tfa).not_nil!}]"
+ select_challenge = "[2,null,null,null,[#{tfa[8]}]]"
tl = challenge_results[1][2]