mirror of https://github.com/apache/lucene.git
fix XSS vulnerability in analysis page
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@669766 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
319fd2b028
commit
0150aeaf61
|
@ -122,12 +122,16 @@
|
|||
try {
|
||||
field = schema.getField(name);
|
||||
} catch (Exception e) {
|
||||
out.println("<strong>Unknown Field: " + name + "</strong>");
|
||||
out.print("<strong>Unknown Field: ");
|
||||
XML.escapeCharData(name, out);
|
||||
out.println("</strong>");
|
||||
}
|
||||
} else {
|
||||
FieldType t = schema.getFieldTypes().get(name);
|
||||
if (null == t) {
|
||||
out.println("<strong>Unknown Field Type: " + name + "</strong>");
|
||||
out.print("<strong>Unknown Field Type: ");
|
||||
XML.escapeCharData(name, out);
|
||||
out.println("</strong>");
|
||||
} else {
|
||||
field = new SchemaField("fakefieldoftype:"+name, t);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue