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

@@ -1,7 +1,7 @@
"""Central location for the application version string.""" """Central location for the application version string."""
from __future__ import annotations from __future__ import annotations
APP_VERSION = "0.1.0b2" APP_VERSION = "0.1.1"
def get_version() -> str: def get_version() -> str:

View File

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