Created a CSRF token system (#526)

* Implement a basic CSRF token system

* Update forms for all modules

* Added to the theme forms

* Create a config option for CSRF prevention

* Slightly rework the filter

* Let's actually use a global var

* Added the token to API hrefs

* Fixup

* Remove old reference

* Added the token to the installer twig globals

* The token isn't actually needed in the installer

* Fix client searching

* Whoops - those need quotes
This commit is contained in:
Belle Aerni authored and GitHub committed 2022-12-06 18:47:14 +01:00
1 parent 5979a6bfb0
commit 8821d50cff
122 files changed
+326 -110

No files matched your search

@@ -53,7 +53,7 @@
<td>{{ queue.created_at|bb_date }}</td>
<td class="actions">
<a class="btn btn-icon api-link"
href="{{ 'api/admin/queue/execute'|link({ 'queue': queue.name }) }}"
href="{{ 'api/admin/queue/execute'|link({ 'queue': queue.name, 'CSRFToken': CSRFToken }) }}"
data-api-confirm="{{ 'Are you sure?'|trans }}"
data-api-reload="1">
<svg class="icon">
@@ -61,7 +61,7 @@
</svg>
</a>
{# <a class="btn btn-icon api-link"
href="{{ 'api/admin/queue/queue_delete'|link({ 'id': queue.name }) }}"
href="{{ 'api/admin/queue/queue_delete'|link({ 'id': queue.name, 'CSRFToken': CSRFToken }) }}"
data-api-confirm="{{ 'Are you sure?'|trans }}"
data-api-reload="1">
<svg class="icon">