Skip to content

Commit

Permalink
fix: sts SignatureDoesNotMatch (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyie committed Aug 10, 2020
1 parent d47c433 commit 009c0b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/sts.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,10 @@ proto._getSignature = function _getSignature(method, params, key) {
* 'SignatureDoesNotMatch'. We need do it ourselves.
*/
proto._escape = function _escape(str) {
return encodeURIComponent(str).replace(/\*/g, '%2A');
return encodeURIComponent(str)
.replace(/!/g, '%21')
.replace(/'/g, '%27')
.replace(/\(/g, '%28')
.replace(/\)/g, '%29')
.replace(/\*/g, '%2A');
};

0 comments on commit 009c0b2

Please sign in to comment.