Updated zone list view to properly encode the zone name when using it to build request URIs to the back-end.

This commit is contained in:
Matt Scott 2023-11-24 09:19:16 -05:00
parent 24c08a269e
commit b347e3df55
No known key found for this signature in database
GPG Key ID: A9A0AFFC0E079001

View File

@ -181,17 +181,17 @@
{% if current_user.role.name in ['Administrator', 'Operator'] or not SETTING.get('dnssec_admins_only') %} {% if current_user.role.name in ['Administrator', 'Operator'] or not SETTING.get('dnssec_admins_only') %}
$(document.body).on("click", ".button_dnssec", function () { $(document.body).on("click", ".button_dnssec", function () {
var domain = $(this).prop('id'); 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 () { $(document.body).on("click", ".button_dnssec_enable", function () {
var domain = $(this).prop('id'); 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 () { $(document.body).on("click", ".button_dnssec_disable", function () {
var domain = $(this).prop('id'); 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 %} {% endif %}
</script> </script>