Open webnoob opened 4 years ago
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.
%2a
%2A
Given a power param of:
power: 'binding:kindle and author-exact:' + author + '*',
The code in utils runs:
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.