aws: preserve plus sign intent inside query parameters#40619
Merged
mattklein123 merged 6 commits intoenvoyproxy:mainfrom Aug 21, 2025
Merged
aws: preserve plus sign intent inside query parameters#40619mattklein123 merged 6 commits intoenvoyproxy:mainfrom
mattklein123 merged 6 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Nigel Brittain <nbaws@amazon.com>
Signed-off-by: Nigel Brittain <nbaws@amazon.com>
Signed-off-by: Nigel Brittain <nbaws@amazon.com>
Contributor
Author
niax
reviewed
Aug 18, 2025
|
|
||
| path_with_query = | ||
| path_with_query.substr(0, query_start + 1) + query_part + path_with_query.substr(query_end); | ||
| headers.setPath(path_with_query); |
There was a problem hiding this comment.
If we're blindly replacing + which could be reasonably treated as a space with %2B, will it break requests that actually mean it as a space?
If this is the proper behaviour, can we link to the AWS docs or SDK that act this way?
Contributor
Author
There was a problem hiding this comment.
I've redone this with a better attempt at preserving the intent of the original pluses, and knowing how we're treating them on the back end. It no longer touches the URL. PTAL when you have a chance.
Signed-off-by: Nigel Brittain <nbaws@amazon.com>
Signed-off-by: Nigel Brittain <nbaws@amazon.com>
niax
approved these changes
Aug 21, 2025
mattklein123
approved these changes
Aug 21, 2025
melginaldi
pushed a commit
to melginaldi/envoy
that referenced
this pull request
Aug 26, 2025
) Commit Message: aws: preserve plus sign inside query parameters Additional Description: Ambiguity in the way query parameters containing literal plus signs could have been encoded leads to a signature verification failure. We now correctly preserve the intent behind plus signs when they arrive in the canonicalizer logic. A raw plus becomes a space, an encoded plus (%2B) stays as a %2B and an encoded space (%20) stays as a %20. Risk Level: Low Testing: Unit Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] envoyproxy#40523 [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: Nigel Brittain <nbaws@amazon.com> Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
melginaldi
pushed a commit
to melginaldi/envoy
that referenced
this pull request
Aug 26, 2025
) Commit Message: aws: preserve plus sign inside query parameters Additional Description: Ambiguity in the way query parameters containing literal plus signs could have been encoded leads to a signature verification failure. We now correctly preserve the intent behind plus signs when they arrive in the canonicalizer logic. A raw plus becomes a space, an encoded plus (%2B) stays as a %2B and an encoded space (%20) stays as a %20. Risk Level: Low Testing: Unit Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] envoyproxy#40523 [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: Nigel Brittain <nbaws@amazon.com> Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
wtzhang23
pushed a commit
to wtzhang23/envoy
that referenced
this pull request
Aug 27, 2025
) Commit Message: aws: preserve plus sign inside query parameters Additional Description: Ambiguity in the way query parameters containing literal plus signs could have been encoded leads to a signature verification failure. We now correctly preserve the intent behind plus signs when they arrive in the canonicalizer logic. A raw plus becomes a space, an encoded plus (%2B) stays as a %2B and an encoded space (%20) stays as a %20. Risk Level: Low Testing: Unit Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] envoyproxy#40523 [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: Nigel Brittain <nbaws@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: aws: preserve plus sign inside query parameters
Additional Description:
Ambiguity in the way query parameters containing literal plus signs could have been encoded leads to a signature verification failure.
We now correctly preserve the intent behind plus signs when they arrive in the canonicalizer logic. A raw plus becomes a space, an encoded plus (%2B) stays as a %2B and an encoded space (%20) stays as a %20.
Risk Level: Low
Testing: Unit
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] #40523
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]