forked from 4ducky/4ducky
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>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
{%- if !errors.is_empty() %}
|
||||
|
||||
<ul>
|
||||
{%- for e in errors %}
|
||||
<li>{{ e|safe }}</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
|
||||
{%- else %}
|
||||
|
||||
<form id="UForm" action="/upload" method="post" enctype="multipart/form-data" >
|
||||
<input type="hidden" name="_csrf" value="{{ csrf }}" />
|
||||
<table width="80%" border="0" cellspacing="1px" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top"><strong>Rules:</strong></td>
|
||||
<td style="padding-left:3px;" valign="top">Gore, CP, Spam, Nazi, Porn = Ban <br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><strong>Image:</strong></td>
|
||||
<td valign="top"><input type="file" name="image" accept="image/jpeg,image/png,image/gif" style="color: #000; background-color: #fff;"/><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><strong>or Url:</strong></td>
|
||||
<td valign="top"><input type="text" name="url" value=""/><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><strong>Comment:</strong></td>
|
||||
<td valign="top"><textarea id="content_comment" name="ucomment" rows="3" cols="30"></textarea><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><input type="submit" name="upload" value="Upload" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" id="q" value="upload" />
|
||||
</form>
|
||||
|
||||
{%- endif %}
|
||||
Reference in New Issue
Block a user