-
Notifications
You must be signed in to change notification settings - Fork 3
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
Need to encode each path segment #12
Comments
Previously was using the implicit encoding from url.pathname but it's not thorough enough. So now decoding from that value to get the raw bit, then when it's split up into pieces encoding each of those as we go. Fixes #12
Simplifying testing infrastructure, improving test coverage, and removing unnecessary code. Also Fixes #12, previously was using the implicit encoding from url.pathname but it's not thorough enough. So now decoding from that value to get the raw bit, then when it's split up into pieces encoding each of those as we go.
Need to be sure that this handles url encoded values as part of the path. Here's an example of the raw value:
And here's an example of what it would look like in a URL:
Here's what needs to happen:
|
This change started failing some of the official AWS sigv4 test suite examples and I was super concerned I was misunderstanding something. Nope. Turns out the official test suite has bad examples in it. Oy vey.
So, given that I've grabbed the latest version of the sigv4 test suite and I'm gonna stare at that chart for a while and see if I can figure out wtf to do here. |
This comment has been minimized.
This comment has been minimized.
This issue is stale because it has been open 30 days with no activity. Remove "no-issue-activity" label or comment or this will be closed in 5 days |
This bot sucks. |
Was seeing some signing errors and narrowed it down to path segments needing to be encoded.
It looks like adding ".map(encodeURIComponent)" in the path function solves the issue:
References: (ctrl + f "segment")
https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
https://docs.aws.amazon.com/AlexaWebInfoService/latest/CalculatingSignatures.html
The text was updated successfully, but these errors were encountered: