[ http://issues.apache.org/jira/browse/HADOOP-423?page=all ]
Doug Cutting updated HADOOP-423: -------------------------------- Status: Open (was: Patch Available) Fix Version/s: 0.7.0 I think the check in the NameNode isn't quite right. We should never permit "." or ".." at any point in a path here, since paths should always be fully qualifited and normalized by the time they reach the namenode, right? Also, it seems a shame to have to call Path.toString(). Perhaps we should add a Path method like: public String element(int i) { return elements[i]; } Then the path checker could be implemented with something like: if (!path.isAbsolute()) { throw ... } for (int i = 0; i < path.depth(); i++) { String element = path.element(i); if (element.equals("..") || element.equals(".") || element.indexOf("/") >= 0) { throw ... } } > file paths are not normalized > ----------------------------- > > Key: HADOOP-423 > URL: http://issues.apache.org/jira/browse/HADOOP-423 > Project: Hadoop > Issue Type: Bug > Components: dfs > Affects Versions: 0.4.0 > Reporter: Christian Kunz > Assigned To: Wendy Chien > Fix For: 0.7.0 > > Attachments: pathnorm2.patch > > > Paths containing '.' or '..' are not normalized -- the corresponding > directories actually seem to be created. This is inconsistent and unexpected > behavior, and is particularly painful when running from a working directory, > using relative paths that start with ... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira