Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filenames with brackets or braces cause exception #105

Open
labkey-dave opened this issue Jun 22, 2018 · 0 comments
Open

Filenames with brackets or braces cause exception #105

labkey-dave opened this issue Jun 22, 2018 · 0 comments

Comments

@labkey-dave
Copy link

If there is a file in S3 whose name has brackets, braces or a %, an exception is thrown from URI.create, called by S3Path.toUri(). For example, if our filename is foo[1], the S3Path object's field "uri" is something like "/foo[1]", toUri() then builds a string "s3://ZZZZZZZ@s3.amazonaws.com/bucketname/foo[1]" which URI.create() doesn't like because of the []. I looked at sun.nio.fs.UnixPath.toUri() and it calls UnixUriUtils, which does encode these chars.

I would suggest that S3Path.encode() add encoding for [], {}, % and perhaps other chars.

Thanks.

amarcionek added a commit to Seven10Storage/Amazon-S3-FileSystem-NIO2 that referenced this issue Nov 27, 2018
Fixes issue Upplication#105 by running the uri through URLEncoder.encode and then
converting allowable characters :, / and [space] back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant