[ 
https://issues.apache.org/jira/browse/HADOOP-12711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15160116#comment-15160116
 ] 

Masatake Iwasaki commented on HADOOP-12711:
-------------------------------------------

{code}
129         String requestURI = request.getRequestURI();
130         try {
131           URI uri = new URI(requestURI);
132           String uriPath = uri.getPath().substring(servletName.length());
133           return uriPath;
134         } catch (URISyntaxException e) {
135           throw new AssertionError("Failed to decode URI: " + requestURI);
136         }
{code}

How about keep using {{getRawPath}} to reuse the code including assertion? like
{code}
      return new URI(getRawPath(request, servletName)).getPath();
{code}

> Remove dependency on commons-httpclient for ServletUtil
> -------------------------------------------------------
>
>                 Key: HADOOP-12711
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12711
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 2.8.0
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>         Attachments: HADOOP-12711.001.patch, HADOOP-12711.002.patch
>
>
> This is a branch-2 only change, as ServletUtil for trunk removes the code 
> that depends on commons-httpclient.
> We need to retire the use of commons-httpclient in Hadoop to address the 
> security concern in CVE-2012-5783 
> http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5783.
> {noformat}
> import org.apache.commons.httpclient.URIException;
> import org.apache.commons.httpclient.util.URIUtil;
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to