function addCustomDNS() {
  var ip = $("#ip").val();
  var domain = $("#domain").val();

  showAlert("info");
  $.ajax({
    url: "scripts/pi-hole/php/customdns.php",
    method: "post",
    dataType: "json",
    data: { action: "add", ip: ip, domain: domain, token: token },
    success: function (response) {
      if (response.success) {
        showAlert("success");
        table.ajax.reload();
      } else showAlert("error", response.message);
    },
    error: function () {
      showAlert("error", "Error while adding this custom DNS entry");
    }
  });
}
The software does not perform an authorization check when an actor attempts to access a resource or perform an action.