mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add support for incorrect password on /login
This commit is contained in:
parent
7621c8ef2d
commit
19f5729e18
1 changed files with 5 additions and 0 deletions
|
@ -482,6 +482,11 @@ 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"
|
||||||
|
error_message = "Incorrect password"
|
||||||
|
next templated "error"
|
||||||
|
end
|
||||||
|
|
||||||
login_res = challenge_results[0][13][2].to_s
|
login_res = challenge_results[0][13][2].to_s
|
||||||
|
|
||||||
login = client.get(login_res, headers)
|
login = client.get(login_res, headers)
|
||||||
|
|
Loading…
Reference in a new issue