-
Notifications
You must be signed in to change notification settings - Fork 249
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
Invalid URL character cause panic #331
Comments
thanks for the report! we'll investigate and get a fix out ASAP |
Code from here:
Looks like we percent encode when character hit the blacklist, but in the real world, input could be really unexpected, and we should encode characters that not on the whitelist. Since we are using |
BTW, maybe we should avoid Which means, I can't use futures::future::FutureExt::catch_unwind to recover my server from panic, which is really horrible. I don't think fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
} |
yeah we will add more exhaustive testing—generally the SDK should never panic when dispatching requests, so this is a bug (and the |
Sounds good to me, thanks for your help. |
awslabs/aws-sdk-rust#331 demonstrated that we were failing to properly encode characters for URI path components and query components in several situation. This: - Fixes the specific bugs - Adds proptests (run locally with 16K cases) to verify that this is the complete set. - Adds an S3-specific protocol test that targets this issue
awslabs/aws-sdk-rust#331 demonstrated that we were failing to properly encode characters for URI path components and query components in several situation. This: - Fixes the specific bugs - Adds proptests (run locally with 16K cases) to verify that this is the complete set. - Adds an S3-specific protocol test that targets this issue
* Fix label & query URI encoding awslabs/aws-sdk-rust#331 demonstrated that we were failing to properly encode characters for URI path components and query components in several situation. This: - Fixes the specific bugs - Adds proptests (run locally with 16K cases) to verify that this is the complete set. - Adds an S3-specific protocol test that targets this issue * Make the test a bit stronger * Update changelog
Thanks for reporting & debugging! the fix for this has landed upstream and will go out in the next release! |
|
Bug Report
Version
aws_sdk_s3 0.2.0 and main branch on github which commit hash is 6feb50d
Platform
Linux DCjanusArchLinuxNUC10 5.15.7-arch1-1 #1 SMP PREEMPT Wed, 08 Dec 2021 14:33:16 +0000 x86_64 GNU/Linux
AWS Services
S3
Description
This code cause panic
Panic message:
The text was updated successfully, but these errors were encountered: