Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #3002 from acrobat/add-csrf-protection
[AllBundles] Add csrf protection to multiple routes
- Loading branch information
Showing
22 changed files
with
311 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
src/Kunstmaan/AdminBundle/Resources/views/Settings/button_resolve.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
{% set action = itemAction.getUrlFor(item) %} | ||
<a href="{{ path(action['path'], action['params']) }}"> | ||
{% if item.isResolved() %} | ||
<i class="fa fa-toggle-on" aria-hidden="true"></i> {{ "settings.exceptions.unresolved" | trans }} | ||
{% else %} | ||
<i class="fa fa-toggle-off" aria-hidden="true"></i> {{ "settings.exceptions.resolved" | trans }} | ||
{% endif %} | ||
</a> | ||
<form method="post" action="{{ path(action['path'], action['params']) }}"> | ||
<input type="hidden" name="token" value="{{ csrf_token('exception-resolve-item') }}"/> | ||
|
||
<button type="submit" class="btn-link"> | ||
{% if item.isResolved() %} | ||
<i class="fa fa-toggle-on" aria-hidden="true"></i> {{ "settings.exceptions.unresolved" | trans }} | ||
{% else %} | ||
<i class="fa fa-toggle-off" aria-hidden="true"></i> {{ "settings.exceptions.resolved" | trans }} | ||
{% endif %} | ||
</button> | ||
</form> |
10 changes: 7 additions & 3 deletions
10
src/Kunstmaan/AdminBundle/Resources/views/Settings/button_resolve_all.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<a href="{{ path(action.getUrl()["path"], action.getUrl()["params"]) }}" class="btn btn-default btn--raise-on-hover"> | ||
{{ action.getLabel() | trans }} | ||
</a> | ||
<form method="post" action="{{ path(action.getUrl()["path"], action.getUrl()["params"]) }}"> | ||
<input type="hidden" name="token" value="{{ csrf_token('exception-resolve_all') }}"/> | ||
|
||
<button type="submit" class="btn btn-default btn--raise-on-hover"> | ||
{{ action.getLabel() | trans }} | ||
</button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.