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

[Bug] When usign * in the power prop for ItemSearch sig is invalid #121

Open
webnoob opened this issue Feb 13, 2020 · 0 comments
Open

[Bug] When usign * in the power prop for ItemSearch sig is invalid #121

webnoob opened this issue Feb 13, 2020 · 0 comments

Comments

@webnoob
Copy link

webnoob commented Feb 13, 2020

Given a power param of:

power: 'binding:kindle and author-exact:' + author + '*',

The code in utils runs:

unsignedString = Object.keys(params).map(function (key) {
    return key + "=" + encodeURIComponent(params[key]).replace(/[!'()*]/g, function(c) {
      return '%' + c.charCodeAt(0).toString(16);
    });
  }).join("&")

Which results in the asterisk being converted into %2a which is technically correct. The issue is that amazon calculates it as %2A (notice the caps) and in turn the sig doesn't validate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant