提问人:user2326796 提问时间:8/19/2021 更新时间:8/19/2021 访问量:62
ASP.NET MVC 5 应用程序 - XSS 代码安全错误
ASP.NET MVC 5 Application - XSS Code Security Error
问:
请您帮助解决此安全问题
function() {
var data = $('#tbCommitteeMembers').DataTable().row($(this).closest('tr')).data();
var role = $(this).val();
if (role==0) {
vroAlert.displayAlert('warning', 'Error2', 'Error');
return;
} else {
$.ajax(
{
type: "GET",
url: `/CommitteeMembers/SetCommitteeMemberRole?Id=${data.Id}&RoleId=${role}`,
contentType: "application/json; charset=utf-8",
dataType: "html",
success: function(data) {
vroAlert.displayAlert('success', '@GlobalLP.SavedSuccessfully',
'@GlobalLP.SavedSuccessfully');
$('#tbCommitteeMembers').DataTable().ajax.reload();
},
error: function(error) {
console.error("Error", error);
}
});
}
});
}
如果此行包含任何代码安全问题以及如何解决,请您提供帮助吗?
url: `/CommitteeMembers/SetCommitteeMemberRole?Id=${data.Id}&RoleId=${role}`,
顺便说一句,虽然 RoleId 和 Data.Id 是数值,但我在上面的代码行中遇到了安全错误!
答: 暂无答案
评论
Id
RoleId