hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject hadoop git commit: HADOOP-12584. Disable browsing the static directory in HttpServer2. Contributed by Robert Kanter.
Date Thu, 19 Nov 2015 23:49:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 bf82a8de3 -> b7e3f419b


HADOOP-12584. Disable browsing the static directory in HttpServer2. Contributed by Robert
Kanter.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b7e3f419
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b7e3f419
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b7e3f419

Branch: refs/heads/branch-2
Commit: b7e3f419bdaa4d46ffb9829dd7873b5221cab077
Parents: bf82a8d
Author: Haohui Mai <wheat9@apache.org>
Authored: Thu Nov 19 15:47:31 2015 -0800
Committer: Haohui Mai <wheat9@apache.org>
Committed: Thu Nov 19 15:47:41 2015 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                   | 3 +++
 .../src/main/java/org/apache/hadoop/http/HttpServer2.java         | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b7e3f419/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 1a5c236..3d714b6 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -808,6 +808,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-11901. BytesWritable fails to support 2G chunks due to integer
     overflow. (Reynold Xin via wheat9)
 
+    HADOOP-12584. Disable browsing the static directory in HttpServer2.
+    (Robert Kanter via wheat9)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b7e3f419/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
index c6e7925..60b583b 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
@@ -562,6 +562,9 @@ public final class HttpServer2 implements FilterContainer {
     staticContext.setResourceBase(appDir + "/static");
     staticContext.addServlet(DefaultServlet.class, "/*");
     staticContext.setDisplayName("static");
+    @SuppressWarnings("unchecked")
+    Map<String, String> params = staticContext.getInitParams();
+    params.put("org.mortbay.jetty.servlet.Default.dirAllowed", "false");
     setContextAttributes(staticContext, conf);
     defaultContexts.put(staticContext, true);
   }


Mime
View raw message