forked from wallabag/wallabag
Protect changeLocale with a CSRF token
This commit is contained in:
@ -16,9 +16,23 @@
|
||||
{% endblock fos_user_content %}
|
||||
</div>
|
||||
<div class="center">
|
||||
<a href="{{ path('changeLocale', {'language': 'de'}) }}">Deutsch</a> –
|
||||
<a href="{{ path('changeLocale', {'language': 'en'}) }}">English</a> –
|
||||
<a href="{{ path('changeLocale', {'language': 'fr'}) }}">Français</a>
|
||||
<form action="{{ path('changeLocale', {'language': 'de'}) }}" method="post" class="inline-block">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('change-locale') }}"/>
|
||||
|
||||
<button type="submit" class="btn-link">Deutsch</button>
|
||||
</form>
|
||||
–
|
||||
<form action="{{ path('changeLocale', {'language': 'en'}) }}" method="post" class="inline-block">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('change-locale') }}"/>
|
||||
|
||||
<button type="submit" class="btn-link">English</button>
|
||||
</form>
|
||||
–
|
||||
<form action="{{ path('changeLocale', {'language': 'fr'}) }}" method="post" class="inline-block">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('change-locale') }}"/>
|
||||
|
||||
<button type="submit" class="btn-link">Français</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user