diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-06 07:49:48 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-06 07:49:48 -0500 |
| commit | a789114f43032b79c3def5a6f1a4d402df4596d4 (patch) | |
| tree | 157cfea4f6e7fb81c1cd4af4297be7ac9a03cee0 /src | |
| parent | 99c02722dbee8452161c6ff79b4cdd10e64c5666 (diff) | |
| download | invidious-a789114f43032b79c3def5a6f1a4d402df4596d4.tar.gz invidious-a789114f43032b79c3def5a6f1a4d402df4596d4.tar.bz2 invidious-a789114f43032b79c3def5a6f1a4d402df4596d4.zip | |
Fix login
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 6fcf39ca..0d085478 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -505,7 +505,7 @@ post "/login" do |env| headers["Cookie"] = URI.unescape(headers["Cookie"]) - if challenge_results[0][5]?.try &.[5] == "INCORRECT_ANSWER_ENTERED" + if challenge_results[0][-1]?.try &.[5] == "INCORRECT_ANSWER_ENTERED" error_message = "Incorrect password" next templated "error" end @@ -534,7 +534,7 @@ post "/login" do |env| challenge_results = challenge_results[5..-1] challenge_results = JSON.parse(challenge_results) - if challenge_results[0][5]?.try &.[5] == "INCORRECT_ANSWER_ENTERED" + if challenge_results[0][-1]?.try &.[5] == "INCORRECT_ANSWER_ENTERED" error_message = "Invalid TFA code" next templated "error" end |
