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

[V4] Updated support for bidi characters in resource paths. #3366

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

boblodgett
Copy link
Contributor

Description

This change adds support for bidi characters in request resource paths in more targets supported by the AWS SDK for .NET. This means applications that target .NET Framework 4.7.2+ and .NET Core 3.1+ will support bidi characters in requests. For the netstandard2.0 target bidi characters may be supported depending on your platform.

No longer will netstandard2.0 return the following error:

Target resource path [???] has bidirectional characters, which are not supported by System.Uri and thus cannot be handled by the .NET SDK.

Instead if your platform using netstandard2.0 dlls doesn't correctly support bidi characters in the Uri class the following error will be returned:

The request signature we calculated does not match the signature you provided.

Motivation and Context

Expands support for bidi characters opening up usage for more targets.

Testing

  • Added integration test verifying behavior using S3.
  • Ran E2E tests on v4-development branch with this update.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@dscpinheiro dscpinheiro added the v4 label Jul 1, 2024
@ashovlin ashovlin requested a review from peterrsongg July 2, 2024 17:38
@boblodgett
Copy link
Contributor Author

Force push was a rebase on the latest v4-development to include a fix for an unrelated test from this PR: #3369

var canonicalizedResourcePath = AWSSDKUtils.JoinResourcePathSegments(encodedSegments, false);
#pragma warning restore 0618
// Get the logger each time (it's cached) because we shouldn't store it in a static variable.
Logger.GetLogger(typeof(AWSSDKUtils)).DebugFormat("{0} encoded {1}{2} for canonicalization: {3}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI #3370 touches this path too and will require a rebase after this is merged (this is more a reminder for myself, feel free to ignore)

@boblodgett boblodgett merged commit a588c12 into v4-development Jul 2, 2024
1 check passed
@boblodgett boblodgett deleted the boblod-v4-bidi branch July 2, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants