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

Crash in S3RequestMiddleware (due to optional bang) #4

Closed
mxcl opened this issue Sep 17, 2019 · 2 comments
Closed

Crash in S3RequestMiddleware (due to optional bang) #4

mxcl opened this issue Sep 17, 2019 · 2 comments

Comments

@mxcl
Copy link

mxcl commented Sep 17, 2019

https://github.com/swift-aws/s3/blob/9deea717490c08c5dac87e8b818cbdb2b227c7e6/Sources/SwiftAWSS3/S3RequestMiddleware.swift#L40

We’re getting a crash here for filenames with spaces in them.

Our fix locally is to percent encode the key, but well, we should remove this bang, it's not safe. Either throw or percent encode ourselves (possibly thus percent encoding twice, not sure if there's a logical way to prevent that).

Happy to PR, LMK what you think.

@adam-fowler
Copy link
Contributor

@mxcl Code in here was so old, surprised it worked at all. I've just updated it with latest from aws-sdk-swift if you want to give it another go.

@adam-fowler
Copy link
Contributor

this is fixed

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

2 participants