From d3d9d353afc4a4af2361fa041c01b107f85a0226 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Fri, 23 Oct 2015 17:23:55 +0000 Subject: [PATCH] SOLR-8074: LoadAdminUIServlet directly references admin.html git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1710271 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 2 ++ .../src/java/org/apache/solr/servlet/LoadAdminUiServlet.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 8d129a9d99d..598d8cde076 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -373,6 +373,8 @@ Other Changes * SOLR-8116: SearchGroupsResultTransformer tweaks (String literals, list/map initialCapacity) (Christine Poerschke) +* SOLR-8074: LoadAdminUIServlet directly references admin.html (Mark Miller, Upayavira) + ================== 5.3.1 ================== Bug Fixes diff --git a/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java b/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java index 98524efbc70..d079e4cabb0 100644 --- a/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java +++ b/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java @@ -47,8 +47,9 @@ public final class LoadAdminUiServlet extends BaseSolrServlet { response.addHeader("X-Frame-Options", "DENY"); // security: SOLR-7966 - avoid clickjacking for admin interface // This attribute is set by the SolrDispatchFilter + String admin = request.getRequestURI().substring(request.getContextPath().length()); CoreContainer cores = (CoreContainer) request.getAttribute("org.apache.solr.CoreContainer"); - InputStream in = getServletContext().getResourceAsStream("/admin.html"); + InputStream in = getServletContext().getResourceAsStream(admin); if(in != null && cores != null) { try { response.setCharacterEncoding("UTF-8");