core: fix pre-hydrated config not being escaped properly

closes #3442

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-08-18 13:53:22 +02:00
parent c900411d5a
commit 198c940a80
3 changed files with 6 additions and 6 deletions

View File

@ -10,8 +10,8 @@
<script> <script>
window.authentik = {}; window.authentik = {};
window.authentik.locale = "{{ tenant.default_locale }}"; window.authentik.locale = "{{ tenant.default_locale }}";
window.authentik.config = JSON.parse('{{ config_json|safe }}'); window.authentik.config = JSON.parse('{{ config_json|escapejs }}');
window.authentik.tenant = JSON.parse('{{ tenant_json|safe }}'); window.authentik.tenant = JSON.parse('{{ tenant_json|escapejs }}');
</script> </script>
{% endblock %} {% endblock %}

View File

@ -12,8 +12,8 @@
<script> <script>
window.authentik = {}; window.authentik = {};
window.authentik.locale = "{{ tenant.default_locale }}"; window.authentik.locale = "{{ tenant.default_locale }}";
window.authentik.config = JSON.parse( '{{ config_json|safe }}'); window.authentik.config = JSON.parse('{{ config_json|escapejs }}');
window.authentik.tenant = JSON.parse('{{ tenant_json|safe }}'); window.authentik.tenant = JSON.parse('{{ tenant_json|escapejs }}');
window.authentik.flow = { window.authentik.flow = {
"layout": "{{ flow.layout }}", "layout": "{{ flow.layout }}",
}; };

View File

@ -10,8 +10,8 @@
<script> <script>
window.authentik = {}; window.authentik = {};
window.authentik.locale = "{{ tenant.default_locale }}"; window.authentik.locale = "{{ tenant.default_locale }}";
window.authentik.config = JSON.parse('{{ config_json|safe }}'); window.authentik.config = JSON.parse('{{ config_json|escapejs }}');
window.authentik.tenant = JSON.parse('{{ tenant_json|safe }}'); window.authentik.tenant = JSON.parse('{{ tenant_json|escapejs }}');
</script> </script>
{% endblock %} {% endblock %}