You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ravi Prakash (JIRA)" <ji...@apache.org> on 2014/05/05 20:00:23 UTC

[jira] [Commented] (HADOOP-10511) s3n:// incorrectly handles URLs with secret keys that contain a slash

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

Ravi Prakash commented on HADOOP-10511:
---------------------------------------

Thanks Daniel and Andrei! If this patch touches only S3FileSystem, I'll consider pulling it in. I don't have the necessary background / time / expertise to try to navigate the bigger mess which is HADOOP-3733.

I'm trying this on trunk after I've applied this patch:
{code}
hadoop fs -ls s3n://<MY_AWS_CRED>:<MY_SECRET_CONTAINING_SLASH>@<MY_BUCKET>/
-ls: Fatal internal error
java.lang.NullPointerException
	at org.apache.hadoop.fs.s3native.NativeS3FileSystem.listStatus(NativeS3FileSystem.java:484)
	at org.apache.hadoop.fs.shell.PathData.getDirectoryContents(PathData.java:268)
	at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:351)
	at org.apache.hadoop.fs.shell.Ls.processPathArgument(Ls.java:98)
	at org.apache.hadoop.fs.shell.Command.processArgument(Command.java:264)
	at org.apache.hadoop.fs.shell.Command.processArguments(Command.java:248)
	at org.apache.hadoop.fs.shell.Command.processRawArguments(Command.java:194)
	at org.apache.hadoop.fs.shell.Command.run(Command.java:155)
	at org.apache.hadoop.fs.FsShell.run(FsShell.java:255)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
	at org.apache.hadoop.fs.FsShell.main(FsShell.java:308)
{code}

The same command where the secret doesn't contain a slash works. Can someone please try it out and confirm / deny this?

> s3n:// incorrectly handles URLs with secret keys that contain a slash
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-10511
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10511
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/s3
>            Reporter: Daniel Darabos
>         Attachments: HADOOP-10511.patch
>
>
> This is similar to HADOOP-3733, but happens on s3n:// instead of s3://.
> Essentially if I have a path like "s3n://key:pass%2Fword@example.com/test", it will under certain circumstances be replaced with "s3n://key:pass/test" which then causes "Invalid hostname in URI" exceptions.
> I have a unit test and a fix for this. I'll make a pull request in a moment.



--
This message was sent by Atlassian JIRA
(v6.2#6252)