From b347e3df5538d89d83d5c18685da23affbe48d78 Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Fri, 24 Nov 2023 09:19:16 -0500 Subject: [PATCH] Updated zone list view to properly encode the zone name when using it to build request URIs to the back-end. --- powerdnsadmin/templates/dashboard.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/powerdnsadmin/templates/dashboard.html b/powerdnsadmin/templates/dashboard.html index 83d71d3..8cb0390 100755 --- a/powerdnsadmin/templates/dashboard.html +++ b/powerdnsadmin/templates/dashboard.html @@ -181,17 +181,17 @@ {% if current_user.role.name in ['Administrator', 'Operator'] or not SETTING.get('dnssec_admins_only') %} $(document.body).on("click", ".button_dnssec", function () { var domain = $(this).prop('id'); - getdnssec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec', domain); + getdnssec($SCRIPT_ROOT + '/domain/' + encodeURIComponent(domain) + '/dnssec', domain); }); $(document.body).on("click", ".button_dnssec_enable", function () { var domain = $(this).prop('id'); - enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/enable', '{{ csrf_token() }}'); + enable_dns_sec($SCRIPT_ROOT + '/domain/' + encodeURIComponent(domain) + '/dnssec/enable', '{{ csrf_token() }}'); }); $(document.body).on("click", ".button_dnssec_disable", function () { var domain = $(this).prop('id'); - enable_dns_sec($SCRIPT_ROOT + '/domain/' + domain + '/dnssec/disable', '{{ csrf_token() }}'); + enable_dns_sec($SCRIPT_ROOT + '/domain/' + encodeURIComponent(domain) + '/dnssec/disable', '{{ csrf_token() }}'); }); {% endif %}