From 9f8273e7175954cf6dd4bf523b531bf9971749bb Mon Sep 17 00:00:00 2001 From: Samir Ahmic Date: Tue, 16 Feb 2016 12:04:37 +0100 Subject: [PATCH] HBASE-15120 Use appropriate encoding for "filter" field in TaskMonitorTmpl.jamon. Signed-off-by: chenheng --- .../hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon index b4a5feae456..c3c5d610cc6 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon @@ -20,12 +20,22 @@ limitations under the License. java.util.*; org.apache.hadoop.hbase.monitoring.*; org.apache.hadoop.util.StringUtils; +org.owasp.esapi.ESAPI; +org.owasp.esapi.errors.EncodingException; <%args> TaskMonitor taskMonitor = TaskMonitor.get(); String filter = "general"; String format = "html"; +<%class> + public String encodeFilter() { + try { + return ESAPI.encoder().encodeForURL(filter); + }catch(EncodingException e) {} + return ESAPI.encoder().encodeForHTML(filter); + } + <%java> List tasks = taskMonitor.getTasks(); Iterator iter = tasks.iterator(); @@ -62,7 +72,7 @@ boolean first = true;
  • class="active">Show All RPC Handler Tasks
  • class="active">Show Active RPC Calls
  • class="active">Show Client Operations
  • -
  • View as JSON
  • +
  • View as JSON
  • <%if tasks.isEmpty()%>

    No tasks currently running on this node.