Browse Source

Prevent against possible XSS

pull/8629/head
liangshiwei 5 years ago
parent
commit
7f18a92b7e
  1. 4
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/details.js
  2. 6
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/index.js
  3. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js

4
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/details.js

@ -87,7 +87,7 @@
data: "author.userName",
render: function (data) {
if (data !== null) {
return GetFilterableDatatableContent('#Author', data);
return GetFilterableDatatableContent('#Author', $.fn.dataTable.render.text().display(data)); //prevent against possible XSS
}
return "";
}
@ -97,7 +97,7 @@
data: "text",
orderable: false,
render: function (data) {
data = data || "";
data = $.fn.dataTable.render.text().display(data || "");
var maxChars = 64;

6
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/index.js

@ -87,7 +87,7 @@
data: "author.userName",
render: function (data) {
if (data !== null) {
return GetFilterableDatatableContent('#Author', data);
return GetFilterableDatatableContent('#Author', $.fn.dataTable.render.text().display(data)); //prevent against possible XSS
}
return "";
}
@ -99,7 +99,7 @@
data: "entityType",
render: function (data) {
if (data !== null) {
return GetFilterableDatatableContent('#EntityType', data);
return GetFilterableDatatableContent('#EntityType', $.fn.dataTable.render.text().display(data));
}
return "";
}
@ -109,7 +109,7 @@
data: "text",
orderable: false,
render: function (data) {
data = data || "";
data = $.fn.dataTable.render.text().display(data || "");
var maxChars = 64;

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js

@ -84,7 +84,7 @@
title: l('RoleName'),
data: 'name',
render: function (data, type, row) {
var name = '<span>' + data + '</span>';
var name = '<span>' + $.fn.dataTable.render.text().display(data) + '</span>'; //prevent against possible XSS
if (row.isDefault) {
name +=
'<span class="badge badge-pill badge-success ml-1">' +

Loading…
Cancel
Save