prevent csrf to flush logs (#2930)

This commit is contained in:
Kevin Papst
2021-11-14 20:39:22 +01:00
committed by GitHub
parent 8b0962e192
commit 6b49535b52
2 changed files with 13 additions and 3 deletions

View File

@@ -80,7 +80,7 @@
{% block box_title %}Logfile (max. {{ logLines }} last lines){% endblock %}
{% block box_tools %}
{% if log_delete %}
<a class="btn-box-tool confirmation-link" href="{{ path('doctor_flush_log') }}" data-question="confirm.delete"><i class="{{ 'delete'|icon }}"></i></a>
<a class="btn-box-tool confirmation-link" href="{{ path('doctor_flush_log', {'token': csrf_token('doctor.flush_log')}) }}" data-question="confirm.delete"><i class="{{ 'delete'|icon }}"></i></a>
{% endif %}
{% endblock %}
{% block box_body %}