diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index 492052f..c24f5ed 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -18,11 +18,15 @@
*/
--%>
<%@ page contentType="text/html;charset=UTF-8"
+ import="static org.apache.commons.lang.StringEscapeUtils.escapeXml"
import="java.util.HashMap"
+ import="java.util.List"
+ import="java.util.Map"
import="org.apache.hadoop.conf.Configuration"
import="org.apache.hadoop.hbase.client.HTable"
import="org.apache.hadoop.hbase.client.HBaseAdmin"
import="org.apache.hadoop.hbase.client.HConnectionManager"
+ import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.HRegionInfo"
import="org.apache.hadoop.hbase.ServerName"
import="org.apache.hadoop.hbase.ServerLoad"
@@ -30,10 +34,7 @@
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.util.Bytes"
import="org.apache.hadoop.hbase.util.FSUtils"
- import="org.apache.hadoop.hbase.protobuf.ProtobufUtil"
- import="java.util.List"
- import="java.util.Map"
- import="org.apache.hadoop.hbase.HConstants"%><%
+ import="org.apache.hadoop.hbase.protobuf.ProtobufUtil"%><%
HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
Configuration conf = master.getConfiguration();
HBaseAdmin hbadmin = new HBaseAdmin(conf);
@@ -217,11 +218,11 @@
String url = "http://" + metaLocation.getHostname() + ":" + infoPort + "/";
%>
- | <%= meta.getRegionNameAsString() %> |
+ <%= escapeXml(meta.getRegionNameAsString()) %> |
<%= metaLocation.getHostname().toString() + ":" + infoPort %> |
- |
- <%= Bytes.toString(meta.getStartKey()) %> |
- <%= Bytes.toString(meta.getEndKey()) %> |
+ <%= escapeXml(Bytes.toString(meta.getStartKey())) %> |
+ <%= escapeXml(Bytes.toString(meta.getEndKey())) %> |
<% } %>
@@ -281,7 +282,7 @@
}
%>
- | <%= Bytes.toStringBinary(regionInfo.getRegionName())%> |
+ <%= escapeXml(Bytes.toStringBinary(regionInfo.getRegionName())) %> |
<%
if (urlRegionServer != null) {
%>
@@ -295,8 +296,8 @@
<%
}
%>
- <%= Bytes.toStringBinary(regionInfo.getStartKey())%> |
- <%= Bytes.toStringBinary(regionInfo.getEndKey())%> |
+ <%= escapeXml(Bytes.toStringBinary(regionInfo.getStartKey())) %> |
+ <%= escapeXml(Bytes.toStringBinary(regionInfo.getEndKey())) %> |
<%= req%> |
<% } %>
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp b/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp
index 6ddd421..b73ce69 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/tablesDetailed.jsp
@@ -18,6 +18,7 @@
*/
--%>
<%@ page contentType="text/html;charset=UTF-8"
+ import="static org.apache.commons.lang.StringEscapeUtils.escapeXml"
import="java.util.*"
import="org.apache.hadoop.util.StringUtils"
import="org.apache.hadoop.conf.Configuration"
@@ -89,8 +90,8 @@
<% for(HTableDescriptor htDesc : tables ) { %>
- | <%= htDesc.getNameAsString() %> |
- <%= htDesc.toString() %> |
+ <%= escapeXml(htDesc.getNameAsString()) %> |
+ <%= escapeXml(htDesc.toString()) %> |
<% } %>