mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-05 23:22:01 +00:00
Add more informative error response on incorrect CAPTCHA
This commit is contained in:
@@ -831,7 +831,12 @@ post "/login" do |env|
|
||||
begin
|
||||
validate_response(challenge, token, answer, "sign_in", HMAC_KEY, PG_DB)
|
||||
rescue ex
|
||||
error_message = ex.message
|
||||
if ex.message && ex.message == "Invalid user"
|
||||
error_message = "Invalid CAPTCHA response"
|
||||
else
|
||||
error_message = ex.message
|
||||
end
|
||||
|
||||
next templated "error"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user