Skip to content

Commit

Permalink
properly sign when payload includes ' or *
Browse files Browse the repository at this point in the history
  • Loading branch information
aarsilv committed Feb 7, 2014
1 parent 3a4f1fe commit 432dc31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/panda/api_authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ function canonicalString(params){
index.sort();

index.forEach(function(key) {
index2.push(key + "=" + encodeURIComponent(params[key]).replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/!/g, "%21"))
index2.push(key + "=" + encodeURIComponent(params[key])
.replace(/\(/g, "%28")
.replace(/\)/g, "%29")
.replace(/!/g, "%21")
.replace(/'/g, "%27")
.replace(/\*/g, "%2A"))
});

return index2.join("&");
Expand Down

0 comments on commit 432dc31

Please sign in to comment.