{% extends "base.html" %}
-{% block title %}{{ _("Sign In") }}{% end block %}
+{% block title %}{{ _("Sign In") }}{% endblock %}
{% block body %}
<section class="section">
<h1 class="title is-1">{{ _("Sign In") }}</h1>
<form method="POST" action="">
- {% raw xsrf_form_html() %}
+ {{ xsrf_form_html() | safe }}
<div class="field">
<p class="control has-icons-left">
- <input class="input {% if failed %}is-danger{% end %}"
+ <input class="input {% if failed %}is-danger{% endif %}"
type="text" name="username" placeholder="{{ _("Username") }}"
- {% if username %}value="{{ username }}"{% end %}>
+ {% if username %}value="{{ username }}"{% endif %}>
<span class="icon is-small is-left">
<i class="fas fa-user"></i>
</span>
<div class="field">
<p class="control has-icons-left">
- <input class="input {% if failed %}is-danger{% end %}"
+ <input class="input {% if failed %}is-danger{% endif %}"
type="password" name="password" placeholder="{{ _("Password") }}"
autocomplete="off">
<span class="icon is-small is-left">
</div>
</div>
</section>
-{% end %}
+{% endblock %}
log = logging.getLogger("pbs.web.auth")
class LoginHandler(base.KerberosAuthMixin, base.BaseHandler):
- def get(self, username=None, failed=False):
+ async def get(self, username=None, failed=False):
if self.current_user:
raise tornado.web.HTTPError(403, "Already logged in")
- self.render("login.html", username=username, failed=failed)
+ await self.render("login.html", username=username, failed=failed)
@base.ratelimit(requests=10, minutes=5)
async def post(self):