You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Ayush Saxena (Jira)" <ji...@apache.org> on 2022/03/21 07:12:00 UTC

[jira] [Resolved] (HDFS-16503) Should verify whether the path name is valid in the WebHDFS

     [ https://issues.apache.org/jira/browse/HDFS-16503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ayush Saxena resolved HDFS-16503.
---------------------------------
    Fix Version/s: 3.4.0
     Hadoop Flags: Reviewed
       Resolution: Fixed

> Should verify whether the path name is valid in the WebHDFS
> -----------------------------------------------------------
>
>                 Key: HDFS-16503
>                 URL: https://issues.apache.org/jira/browse/HDFS-16503
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: tomscut
>            Assignee: tomscut
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>         Attachments: image-2022-03-14-09-35-49-860.png
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> When creating a file using WebHDFS, there are two main steps:
> 1. Obtain the location of the Datanode to be written.
> 2. Put the file to this location.
> Currently *NameNodeRpcServer* verifies that pathName is valid, but *NamenodeWebHdfsMethods* and *RouterWebHdfsMethods* do not.
> So if we use an invalid path(such as duplicated slash), the first step returns success, but the second step throws an {*}InvalidPathException{*}. IMO, we should also do the validation in WebHdfs, which is consistent with the NameNodeRpcServer.
> !image-2022-03-14-09-35-49-860.png|width=548,height=164!
> The same webHDFS operations are: CREATE, APPEND, OPEN, GETFILECHECKSUM. So we can add DFSUtil.isValidName to redirectURI for *NamenodeWebHdfsMethods* and *RouterWebHdfsMethods.*



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org