mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Fix login
This commit is contained in:
parent
99c02722db
commit
a789114f43
1 changed files with 2 additions and 2 deletions
|
@ -505,7 +505,7 @@ post "/login" do |env|
|
||||||
|
|
||||||
headers["Cookie"] = URI.unescape(headers["Cookie"])
|
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"
|
error_message = "Incorrect password"
|
||||||
next templated "error"
|
next templated "error"
|
||||||
end
|
end
|
||||||
|
@ -534,7 +534,7 @@ post "/login" do |env|
|
||||||
challenge_results = challenge_results[5..-1]
|
challenge_results = challenge_results[5..-1]
|
||||||
challenge_results = JSON.parse(challenge_results)
|
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"
|
error_message = "Invalid TFA code"
|
||||||
next templated "error"
|
next templated "error"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue