UI - add CSRF protection
This commit is contained in:
@@ -2,13 +2,9 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-12 col-md-6 text-center">
|
||||
<div class="alert alert-danger">
|
||||
Something went wrong...<br />
|
||||
{{ error }}
|
||||
</div>
|
||||
<div class="alert alert-danger text-center">
|
||||
Something went wrong...<br /><br />
|
||||
{{ error }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
<div class="col col-12 col-lg-6">
|
||||
<form id="form-instance-{{ instance["id"] }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="INSTANCE_ID" value="{{ instance["id"] }}">
|
||||
</form>
|
||||
<div class="card border-{{ color }} mb-3" style="max-width: 80rem;">
|
||||
|
||||
@@ -9,7 +9,13 @@
|
||||
<img src="img/logo.png" class="mb-4" style="max-width: 200px;">
|
||||
</div>
|
||||
<h1 class="h3 mb-3 fw-normal">Authentication required</h1>
|
||||
{% if fail %}
|
||||
<div class="alert alert-danger fade show text-break" role="alert">
|
||||
Wrong username and/or password...
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="login" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="form-floating">
|
||||
<input type="text" id="username" class="form-control" name="username" placeholder="user">
|
||||
<label for="username">Username</label>
|
||||
@@ -22,5 +28,4 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -8,6 +8,7 @@
|
||||
<div class="modal-body">
|
||||
Are you sure you want to delete the configuration of {{ service["SERVER_NAME"] }} ?
|
||||
<form id="form-delete-{{ id_server_name }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" value="{{ service["SERVER_NAME"] }}" name="SERVER_NAME">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<form id="form-edit-{{ id_server_name }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" value="{{ service["SERVER_NAME"] }}" name="OLD_SERVER_NAME">
|
||||
<div class="tab-content" id="edit-content-{{ id_server_name }}">
|
||||
{% set check = {"class": "show active"} %}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<form id="form-new">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="tab-content" id="new-content">
|
||||
{% set check = {"class": "show active"} %}
|
||||
{% for k, v in config["CONFIG"].get_settings().items() %}
|
||||
|
||||
Reference in New Issue
Block a user