Add missing CSRF token in connections.html

This commit is contained in:
2025-11-21 23:04:56 +08:00
parent f2daa8a8a3
commit 5350d04ba5
2 changed files with 3 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
</div>
<div class="card-body">
<form method="POST" action="{{ url_for('ui.create_connection') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" class="form-control" id="name" name="name" required placeholder="e.g. Production Backup">
@@ -71,6 +72,7 @@
<td><code>{{ conn.access_key }}</code></td>
<td>
<form method="POST" action="{{ url_for('ui.delete_connection', connection_id=conn.id) }}" onsubmit="return confirm('Are you sure?');" style="display: inline;">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
</form>
</td>