You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/03/04 05:38:05 UTC

svn commit: r1077628 - /hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java

Author: omalley
Date: Fri Mar  4 04:38:05 2011
New Revision: 1077628

URL: http://svn.apache.org/viewvc?rev=1077628&view=rev
Log:
commit 3700cc65ee4585a40f044c5fb01aa52d25d141be
Author: Rohini Sangeetha Palaniswamy <ro...@yahoo-inc.com>
Date:   Mon Aug 2 20:51:58 2010 -0700

    HDFS:1317 from https://issues.apache.org/jira/secure/attachment/12450275/HDFS-1317.patch

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java?rev=1077628&r1=1077627&r2=1077628&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java (original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java Fri Mar  4 04:38:05 2011
@@ -43,14 +43,6 @@ public class AuthorizationFilter impleme
   protected static final Pattern HFTP_PATTERN = Pattern
       .compile("^(/listPaths|/data|/streamFile|/file)$");
 
-  /**
-   * Pattern for a filter to find out if an HFTP/HSFTP request stores its file
-   * path in the extra path information associated with the URL; if not, the
-   * file path is stored in request parameter "filename"
-   */
-  protected static final Pattern FILEPATH_PATTERN = Pattern
-      .compile("^(/listPaths|/data|/file)$");
-
   protected String contextPath;
 
   protected String namenode;
@@ -116,14 +108,8 @@ public class AuthorizationFilter impleme
     // check request path
     String servletPath = rqst.getServletPath();
     if (HFTP_PATTERN.matcher(servletPath).matches()) {
-      // request is an HSFTP request
-      if (FILEPATH_PATTERN.matcher(servletPath).matches()) {
         // file path as part of the URL
         filePath = rqst.getPathInfo() != null ? rqst.getPathInfo() : "/";
-      } else {
-        // file path is stored in "filename" parameter
-        filePath = rqst.getParameter("filename");
-      }
     }
     return filePath;
   }