HADOOP-12584. Disable browsing the static directory in HttpServer2. Contributed by Robert Kanter.
This commit is contained in:
parent
8e03e855b6
commit
4539131102
@ -1429,6 +1429,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
HADOOP-11901. BytesWritable fails to support 2G chunks due to integer
|
HADOOP-11901. BytesWritable fails to support 2G chunks due to integer
|
||||||
overflow. (Reynold Xin via wheat9)
|
overflow. (Reynold Xin via wheat9)
|
||||||
|
|
||||||
|
HADOOP-12584. Disable browsing the static directory in HttpServer2.
|
||||||
|
(Robert Kanter via wheat9)
|
||||||
|
|
||||||
Release 2.7.3 - UNRELEASED
|
Release 2.7.3 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -530,6 +530,9 @@ protected void addDefaultApps(ContextHandlerCollection parent,
|
|||||||
staticContext.setResourceBase(appDir + "/static");
|
staticContext.setResourceBase(appDir + "/static");
|
||||||
staticContext.addServlet(DefaultServlet.class, "/*");
|
staticContext.addServlet(DefaultServlet.class, "/*");
|
||||||
staticContext.setDisplayName("static");
|
staticContext.setDisplayName("static");
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
Map<String, String> params = staticContext.getInitParams();
|
||||||
|
params.put("org.mortbay.jetty.servlet.Default.dirAllowed", "false");
|
||||||
setContextAttributes(staticContext, conf);
|
setContextAttributes(staticContext, conf);
|
||||||
defaultContexts.put(staticContext, true);
|
defaultContexts.put(staticContext, true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user