mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Force all columns in any declared datatable to render using datatables render.text function to prevent possible (very low risk, requiring authenticated dashboard anyway) XSS.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -216,7 +216,13 @@ $(function () {
|
||||
if (document.getElementById("DHCPLeasesTable")) {
|
||||
leasetable = $("#DHCPLeasesTable").DataTable({
|
||||
dom: "<'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'f>>",
|
||||
columnDefs: [{ bSortable: false, orderable: false, targets: -1 }],
|
||||
columnDefs: [
|
||||
{ bSortable: false, orderable: false, targets: -1 },
|
||||
{
|
||||
targets: "_all",
|
||||
render: $.fn.dataTable.render.text(),
|
||||
},
|
||||
],
|
||||
paging: false,
|
||||
scrollCollapse: true,
|
||||
scrollY: "200px",
|
||||
@@ -235,7 +241,13 @@ $(function () {
|
||||
if (document.getElementById("DHCPStaticLeasesTable")) {
|
||||
staticleasetable = $("#DHCPStaticLeasesTable").DataTable({
|
||||
dom: "<'row'<'col-sm-12'tr>><'row'<'col-sm-12'i>>",
|
||||
columnDefs: [{ bSortable: false, orderable: false, targets: -1 }],
|
||||
columnDefs: [
|
||||
{ bSortable: false, orderable: false, targets: -1 },
|
||||
{
|
||||
targets: "_all",
|
||||
render: $.fn.dataTable.render.text(),
|
||||
},
|
||||
],
|
||||
paging: false,
|
||||
scrollCollapse: true,
|
||||
scrollY: "200px",
|
||||
|
||||
Reference in New Issue
Block a user