Skip to content

fix: consistently encode query #935

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

Merged
merged 1 commit into from
Feb 17, 2020

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Feb 17, 2020

Fixes SignatureV4's getCanonicalQuery to use consistent query encoding via the escapeUri function used in the querystring-builder package.

The querystring-builder is used by each of the handler packages (node-http-handler, fetch-http-handler) to convert a HttpRequest query property into an encoded query string. getCanonicalQuery in SignatureV4 must use the same enocding to assure that signatures are calculated properly.

Also, removes unused escapeUriPath from querystring-builder.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (smithy-codegen@08f8213). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                @@
##             smithy-codegen     #935   +/-   ##
=================================================
  Coverage                  ?   91.58%           
=================================================
  Files                     ?      147           
  Lines                     ?     2912           
  Branches                  ?      507           
=================================================
  Hits                      ?     2667           
  Misses                    ?      245           
  Partials                  ?        0
Impacted Files Coverage Δ
packages/signature-v4/src/getCanonicalQuery.ts 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08f8213...4a058a0. Read the comment docs.

@AllanZhengYP AllanZhengYP merged commit 251dd57 into aws:smithy-codegen Feb 17, 2020
@srchase srchase deleted the canonical-query-encoding branch February 17, 2020 23:36
AllanZhengYP added a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Feb 18, 2020
remove the query encoding in the codegenerator. It will be handled
inside request handler.

Corresponding V3 PR: [aws#935](aws#935)
AllanZhengYP added a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Feb 18, 2020
remove the query encoding in the codegenerator. It will be handled
inside request handler.

Corresponding V3 PR: [aws#935](aws#935)
AllanZhengYP added a commit that referenced this pull request Feb 18, 2020
remove the query encoding in the codegenerator. It will be handled
inside request handler.

Corresponding V3 PR: [#935](#935)
@lock
Copy link

lock bot commented Feb 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants