【发布时间】:2014-05-13 04:11:42
【问题描述】:
我继承了一个遗留应用程序,下面给出了一个 sn-p 代码。
private static void printKeywordCheckboxes(JspWriter out, ArrayList words, int type)
throws IOException {
LogbookKeyword thisWord;
Iterator iterWord = words.iterator();
while (iterWord.hasNext()) {
thisWord = (LogbookKeyword) iterWord.next();
out.println(" <input type=\"checkbox\" name=\"keywordCheckbox" +
type + "\" value=\"" +
thisWord.hashCode() + "\" checked/>" +
thisWord.getWord() + "<br>");
}
}
Veracode 在“out.println()”处抛出异常“网页中与脚本相关的 HTML 标记的不正确中和(基本 XSS)”。
谁能告诉我这个问题应该如何解决?任何帮助将不胜感激。
【问题讨论】: