Files
5ducky/templates/register.html
T
kibiandClaude Opus 5.5 d0f2d526df Port 4ducky to Rust (Axum + SQLite)
Same design, layout, URLs and features as the PHP version: browse grid,
image view with AJAX comments, BBCode, likes, uploads (file, URL and
bookmarklet), quicktagger, profile, block list, inbox, invites, Hall of
Ducks, Truhe, abuse reports and the admin tools.

- Parameterized SQL, escaped templates (askama), argon2 passwords,
  server-side sessions, CSRF tokens on every write, strict script CSP
- SSRF-safe remote image fetching, magic-byte upload checks
- Self-hosted captcha replaces reCAPTCHA v1; analytics/social widgets removed
- Vanilla JS replaces jQuery and its plugins with the same DOM behaviour
- Reverse proxy support (frontend_path, trust_proxy, secure_cookies)
- Admin CLI: admin, settings, invites

See README.md for running it and the full list of changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 02:15:05 +02:00

85 lines
2.4 KiB
HTML

{% include "header.html" %}
<div align="center">
<form action="/register" method="post">
<input type="hidden" name="_csrf" value="{{ l.csrf }}"/>
<fieldset>
<legend>Create Account</legend>
{%- if m.name_in_use %}
<div class="warn">This Username is {% if invite.is_some() %}allready{% else %}already{% endif %} registered!</div>
{%- endif %}
{%- if m.name_invalid %}
<div class="warn">Your name must be at least 2 characters long an may not have any special characters!</div>
{%- endif %}
{%- if m.pass_short %}
<div class="warn">Your password must be at least 6 characters long!</div>
{%- endif %}
{%- if m.pass_not_equal %}
<div class="warn">Your both passwords are not equal!</div>
{%- endif %}
{%- if m.email_in_use %}
<div class="warn">There is already a registered user with this E-Mail address!</div>
{%- endif %}
{%- if m.wrong_email %}
<div class="warn">Your E-Mail address seems to be invalid!</div>
{%- endif %}
{%- if m.captcha_inc %}
<div class="warn">Incorrect Captcha!</div>
{%- endif %}
<dl class="form">
<dt>{% if invite.is_some() %}Name:{% else %}Username:{% endif %}</dt>
<dd>
<input type="text" name="name" value="{{ name }}"/>
Only letters and numbers; at least 2 characters long{% if invite.is_none() %}; no spaces{% endif %}
</dd>
<dt>E-Mail:</dt>
<dd>
<input type="text" name="email" value="{{ email }}"/>
Must be valid!
</dd>
<dt>Password:</dt>
<dd>
<input type="password" name="pass" class="pass"/>
</dd>
<dt>(Repeat)</dt>
<dd>
<input type="password" name="pass2" class="pass"/>
</dd>
{%- if let Some(code) = invite %}
<dt>Invitecode: </dt>
<dd>
<div style="padding:5px;">
{{ code }}
<input type="hidden" name="invite" value="{{ code }}"/>
</div>
</dd>
{%- endif %}
<dt>Captcha{% if invite.is_none() %}:{% endif %}</dt>
<dd>
<img src="/captcha/{{ captcha }}.png" width="180" height="56" alt="captcha" style="vertical-align:middle;"/><br/>
<input type="hidden" name="captcha_id" value="{{ captcha }}"/>
<input type="text" name="captcha" autocomplete="off" maxlength="5"/>
</dd>
<dt>&nbsp;</dt>
<dd>
<input type="submit" name="register" class="button register" value="Register" />
</dd>
</dl>
</fieldset>
</form>
</div>
{% include "footer.html" %}