【发布时间】:2015-11-04 16:59:42
【问题描述】:
这是我在这里的第一篇文章:
扫描报告中有 2 个问题。请帮我解决这个问题:
Xss 攻击:
protected void gvMSMQ_RowDataBound(object sender, GridViewRowEventArgs e)**信息泄露:
lblError.Text = "RowBound - " + errorMessage + "......" + ex.Message
感谢您的帮助。
protected void gvMSMQ_RowDataBound(object sender, GridViewRowEventArgs e)
{
string Path = string.Empty;
string errorMessage = "";
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Image img = (Image)e.Row.Cells[0].FindControl("img1");
Literal ltrl = (Literal)e.Row.FindControl("lit1");
ltrl.Text = ltrl.Text.Replace("trCollapseGrid", "trCollapseGrid" + e.Row.RowIndex.ToString());
string str = "trCollapseGrid" + e.Row.RowIndex.ToString();
e.Row.Cells[0].Attributes.Add("OnClick", "OpenTable('" + str + "','" + img.ClientID + "')");
e.Row.Cells[0].RowSpan = 1;
errorMessage = "Two";
//Path = lstMSMQ[e.Row.RowIndex].Path;
UCEnvironmentViewerQueueGrid ucQueueGrids = (UCEnvironmentViewerQueueGrid)e.Row.FindControl("ucQueueGrids");
Classes.MSMQprofile msmqObj = new Classes.MSMQprofile();
var rowItems = e.Row.DataItem;
msmqObj = rowItems as Classes.MSMQprofile;
ucQueueGrids.lstNormalMSMQ = msmqObj.NormalQueueList;
//ucQueueGrids.lstJournalQueue = msmqObj.JournalQueueList;
ucQueueGrids.BindControl();
}
}
catch (Exception ex)
{
//error on this line!
lblError.Text = "RowBound - " + errorMessage + "......" + ex.Message;
}
}
【问题讨论】:
-
欢迎来到 StackOverflow!您应该确保用您使用的语言标记您的问题。另外,很高兴知道您使用的是什么扫描仪。
-
当然。使用 C# 和 WH Sentinel