Skip to content

Commit

Permalink
Merge pull request #1003 from stripe/ianjabour-DX-5877-trim-webhook-g…
Browse files Browse the repository at this point in the history
…et-signatures

Add trim to getSignatures to allow for leading whitespace.
  • Loading branch information
ianjabour-stripe authored Aug 31, 2020
2 parents 0195e3d + 12c0b2c commit 4b497e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/WebhookSignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private static function getSignatures($header, $scheme)

foreach ($items as $item) {
$itemParts = \explode('=', $item, 2);
if ($itemParts[0] === $scheme) {
if (\trim($itemParts[0]) === $scheme) {
\array_push($signatures, $itemParts[1]);
}
}
Expand Down

0 comments on commit 4b497e4

Please sign in to comment.