YARN-266. RM and JHS Web UIs are blank because AppsBlock is not escaping string properly. Contributed by Ravi Prakash
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1420232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
99d072d072
commit
b72b36009a
|
@ -78,12 +78,12 @@ public class HsJobsBlock extends HtmlBlock {
|
||||||
.append(dateFormat.format(new Date(job.getFinishTime()))).append("\",\"")
|
.append(dateFormat.format(new Date(job.getFinishTime()))).append("\",\"")
|
||||||
.append("<a href='").append(url("job", job.getId())).append("'>")
|
.append("<a href='").append(url("job", job.getId())).append("'>")
|
||||||
.append(job.getId()).append("</a>\",\"")
|
.append(job.getId()).append("</a>\",\"")
|
||||||
.append(StringEscapeUtils.escapeHtml(job.getName()))
|
.append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
|
||||||
.append("\",\"")
|
job.getName()))).append("\",\"")
|
||||||
.append(StringEscapeUtils.escapeHtml(job.getUserName()))
|
.append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
|
||||||
.append("\",\"")
|
job.getUserName()))).append("\",\"")
|
||||||
.append(StringEscapeUtils.escapeHtml(job.getQueueName()))
|
.append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
|
||||||
.append("\",\"")
|
job.getQueueName()))).append("\",\"")
|
||||||
.append(job.getState()).append("\",\"")
|
.append(job.getState()).append("\",\"")
|
||||||
.append(String.valueOf(job.getMapsTotal())).append("\",\"")
|
.append(String.valueOf(job.getMapsTotal())).append("\",\"")
|
||||||
.append(String.valueOf(job.getMapsCompleted())).append("\",\"")
|
.append(String.valueOf(job.getMapsCompleted())).append("\",\"")
|
||||||
|
|
|
@ -206,6 +206,9 @@ Release 0.23.6 - UNRELEASED
|
||||||
YARN-258. RM web page UI shows Invalid Date for start and finish times
|
YARN-258. RM web page UI shows Invalid Date for start and finish times
|
||||||
(Ravi Prakash via jlowe)
|
(Ravi Prakash via jlowe)
|
||||||
|
|
||||||
|
YARN-266. RM and JHS Web UIs are blank because AppsBlock is not escaping
|
||||||
|
string properly (Ravi Prakash via jlowe)
|
||||||
|
|
||||||
Release 0.23.5 - UNRELEASED
|
Release 0.23.5 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -84,12 +84,12 @@ class AppsBlock extends HtmlBlock {
|
||||||
appsTableData.append("[\"<a href='")
|
appsTableData.append("[\"<a href='")
|
||||||
.append(url("app", appInfo.getAppId())).append("'>")
|
.append(url("app", appInfo.getAppId())).append("'>")
|
||||||
.append(appInfo.getAppId()).append("</a>\",\"")
|
.append(appInfo.getAppId()).append("</a>\",\"")
|
||||||
.append(StringEscapeUtils.escapeHtml(appInfo.getUser()))
|
.append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
|
||||||
.append("\",\"")
|
appInfo.getUser()))).append("\",\"")
|
||||||
.append(StringEscapeUtils.escapeHtml(appInfo.getName()))
|
.append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
|
||||||
.append("\",\"")
|
appInfo.getName()))).append("\",\"")
|
||||||
.append(StringEscapeUtils.escapeHtml(appInfo.getQueue()))
|
.append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
|
||||||
.append("\",\"")
|
appInfo.getQueue()))).append("\",\"")
|
||||||
.append(appInfo.getStartTime()).append("\",\"")
|
.append(appInfo.getStartTime()).append("\",\"")
|
||||||
.append(appInfo.getFinishTime()).append("\",\"")
|
.append(appInfo.getFinishTime()).append("\",\"")
|
||||||
.append(appInfo.getState()).append("\",\"")
|
.append(appInfo.getState()).append("\",\"")
|
||||||
|
|
Loading…
Reference in New Issue