My Project Client wants all the application to be Veracode Compliant....After giving it for Veracode Staic Scan found that there are 326 flaws which are needed to be fixed as a part of Cross Site Scripting Error.
The application for which Scan was given is basically built using ASP Classic (VBScript).
some of the lines reported are:
<td <%=feltfarve%> nowrap><%=tabeltekst_start%><a href="#" onclick="checkbrowser('<%=rsDBox("filid")%>','');" onmouseover=" window.status=' <%= f(18) & " " & rsDBox("filnavn")%>'; return true" onmouseout="window.status=''; return true");"><%=rsDBox("filnavn")%></a><%=tabeltekst_slut%></td>
<a onmouseover="EnterContent('ToolTip','<%=f(33)%>','<% if sagerRS("dkrerefnr") <> "" then Response.Write (replace(f(34),"%1", sagerRS("dkrerefnr"))) else Response.Write(replace(f(34),"%1", f(35))) end if%>'); Activate();" onmouseout="deActivate()" href="javascript:void(0)"><img src="/secure/images/rolloverknap/gray_e.gif" border="0" WIDTH="12" HEIGHT="12"></a>
Response.Write " <a onmouseover=""EnterContent('ToolTip','"& f(36) &"','" & kretxt & "'); Activate();"" onmouseout=""deActivate()"" href=""javascript:void(0)""><img src=""/secure/images/rolloverknap/gray_i.gif"" border=""0"" WIDTH=""12"" HEIGHT=""12""></a> "
What type of fix can be applied to solve these Cross Scripting Flaws??
I think we should use Server.HTMLEncode to fix XSS (cross site scripting) threat.