SOLR-1579: fixes to xml escaping in stats.jsp (the fix commited as part of SOLR-1008 was incorrect)

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@909705 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2010-02-13 03:28:07 +00:00
parent 249be10000
commit 5bfe85082e
2 changed files with 14 additions and 11 deletions

View File

@ -175,6 +175,9 @@ Bug Fixes
* SOLR-1736:In the slave , If 'mov'ing file does not succeed , copy the file (noble) * SOLR-1736:In the slave , If 'mov'ing file does not succeed , copy the file (noble)
* SOLR-1579: Fixes to XML escaping in stats.jsp
(David Bowen and hossman)
Other Changes Other Changes
---------------------- ----------------------

View File

@ -27,12 +27,12 @@
<solr> <solr>
<% <%
if (core.getName() != null) { %> if (core.getName() != null) { %>
<core><%=core.getName()%></core> <core><% XML.escapeCharData(core.getName(), out); %></core>
<% } %> <% } %>
<schema><%= collectionName %></schema> <schema><% XML.escapeCharData(collectionName, out); %></schema>
<host><%= hostname %></host> <host><% XML.escapeCharData(hostname, out); %></host>
<now><%= new Date().toString() %></now> <now><% XML.escapeCharData(new Date().toString(), out); %></now>
<start><%= new Date(core.getStartTime()) %></start> <start><% XML.escapeCharData(new Date(core.getStartTime()).toString(), out); %></start>
<solr-info> <solr-info>
<% <%
for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) { for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {
@ -55,23 +55,23 @@ for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {
%> %>
<entry> <entry>
<name> <name>
<%= key %> <% XML.escapeCharData(key, out); %>
</name> </name>
<class> <class>
<%= name %> <% XML.escapeCharData(name, out); %>
</class> </class>
<version> <version>
<%= vers %> <% XML.escapeCharData(vers, out); %>
</version> </version>
<description> <description>
<%= desc %> <% XML.escapeCharData(desc, out); %>
</description> </description>
<stats> <stats>
<% <%
for (int i = 0; i < nl.size() ; i++) { for (int i = 0; i < nl.size() ; i++) {
%> %>
<stat name="<%XML.escapeCharData(nl.getName(i), out); %>" > <stat name="<% XML.escapeAttributeValue(nl.getName(i), out); %>" >
<%= nl.getVal(i).toString() %> <% XML.escapeCharData(nl.getVal(i).toString(), out); %>
</stat> </stat>
<% <%
} }