Skip to content

Commit

Permalink
Adding Signature to the list of ignored parameters when signing a req…
Browse files Browse the repository at this point in the history
…uest
  • Loading branch information
mtdowling committed Mar 29, 2011
1 parent 1647001 commit 7b0df19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Signature/SignatureV2.php
Expand Up @@ -40,7 +40,9 @@ public function calculateStringToSign(array $request, array $options = null)
}

if (!array_key_exists('ignore', $options)) {
$options['ignore'] = 'awsSignature';
$options['ignore'] = array('awsSignature', 'Signature');
} else {
$options['ignore'] = (array) $options['ignore'];
}

if (!array_key_exists('sort_method', $options)) {
Expand All @@ -58,7 +60,7 @@ public function calculateStringToSign(array $request, array $options = null)
uksort($request, $options['sort_method']);

foreach ($request as $k => $v) {
if ($k && $v && strcmp($k, $options['ignore'])) {
if ($k && $v && !in_array($k, $options['ignore'])) {
if ($parameterString) {
$parameterString .= '&';
}
Expand Down

0 comments on commit 7b0df19

Please sign in to comment.