mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-31 20:11:23 +00:00
Fixes https://github.com/iv-org/invidious/issues/5295 textcaptcha.com seems to be down since April and it does not appear that service will be restored. Text captchas can be easily automated using free LLMs, so keeping the text captcha is more like a gate to create accounts in mass on public Invidious instances. It also gives headaches like bots automating account creation to modify the videos that appear popular page of each instance (since the popular page is based on the subscriptions of the registered users).
51 lines
2.7 KiB
Plaintext
51 lines
2.7 KiB
Plaintext
<% content_for "header" do %>
|
|
<title><%= translate(locale, "Log in") %> - Invidious</title>
|
|
<% end %>
|
|
|
|
<div class="pure-g">
|
|
<div class="pure-u-1 pure-u-lg-1-5"></div>
|
|
<div class="pure-u-1 pure-u-lg-3-5">
|
|
<div class="h-box">
|
|
<% case account_type when %>
|
|
<% else # "invidious" %>
|
|
<form class="pure-form pure-form-stacked" action="/login?referer=<%= URI.encode_www_form(referer) %>&type=invidious" method="post">
|
|
<fieldset>
|
|
<% if email %>
|
|
<input name="email" type="hidden" value="<%= HTML.escape(email) %>">
|
|
<% else %>
|
|
<label for="email"><%= translate(locale, "User ID") %> :</label>
|
|
<input required class="pure-input-1" name="email" type="text" placeholder="<%= translate(locale, "User ID") %>">
|
|
<% end %>
|
|
|
|
<% if password %>
|
|
<input name="password" type="hidden" value="<%= HTML.escape(password) %>">
|
|
<% else %>
|
|
<label for="password"><%= translate(locale, "Password") %> :</label>
|
|
<input required class="pure-input-1" name="password" type="password" placeholder="<%= translate(locale, "Password") %>">
|
|
<% end %>
|
|
|
|
<% if captcha %>
|
|
<% captcha = captcha.not_nil! %>
|
|
<img style="width:50%" src='<%= captcha[:question] %>'/>
|
|
<% captcha[:tokens].each_with_index do |token, i| %>
|
|
<input type="hidden" name="token[<%= i %>]" value="<%= HTML.escape(token) %>">
|
|
<% end %>
|
|
<label for="answer"><%= translate(locale, "Time (h:mm:ss):") %></label>
|
|
<input type="text" name="answer" type="text" placeholder="h:mm:ss">
|
|
|
|
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary">
|
|
<%= translate(locale, "Register") %>
|
|
</button>
|
|
<% else %>
|
|
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary">
|
|
<%= translate(locale, "Sign In") %>/<%= translate(locale, "Register") %>
|
|
</button>
|
|
<% end %>
|
|
</fieldset>
|
|
</form>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<div class="pure-u-1 pure-u-lg-1-5"></div>
|
|
</div>
|