You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2019/08/13 15:37:19 UTC
svn commit: r1865046 -
/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java
Author: cziegeler
Date: Tue Aug 13 15:37:19 2019
New Revision: 1865046
URL: http://svn.apache.org/viewvc?rev=1865046&view=rev
Log:
FELIX-6170 : NPE in web console plugin if context path is missing for ServletContextHelper
Modified:
felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java
Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java?rev=1865046&r1=1865045&r2=1865046&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java (original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java Tue Aug 13 15:37:19 2019
@@ -428,7 +428,7 @@ public class HttpServicePlugin extends H
pw.println("<th class=\"header\">${Name}</th>");
pw.println("<th class=\"header\">${Value)}</th>");
pw.println("</tr></thead>");
- odd = printRow(pw, odd, "${Path}", getContextPath(dto.contextPath));
+ odd = printRow(pw, odd, "${Path}", escapeXml(getContextPath(dto.contextPath)));
odd = printRow(pw, odd, "${service.id}", String.valueOf(dto.serviceId));
odd = printServiceRankingRow(pw, dto.serviceId, odd);
pw.println("</table>");
@@ -455,8 +455,9 @@ public class HttpServicePlugin extends H
pw.println("<th class=\"header\">${Name}</th>");
pw.println("<th class=\"header\">${Value)}</th>");
pw.println("</tr></thead>");
- odd = printRow(pw, odd, "${Path}", getContextPath(dto.contextPath));
- odd = printRow(pw, odd, "${reason}", getErrorText(dto.failureReason));
+ odd = printRow(pw, odd, "${Path}",
+ dto.contextPath == null ? dto.contextPath : escapeXml(getContextPath(dto.contextPath)));
+ odd = printRow(pw, odd, "${reason}", escapeXml(getErrorText(dto.failureReason)));
odd = printRow(pw, odd, "${service.id}", String.valueOf(dto.serviceId));
pw.println("</table>");
}