Skip to content

Commit 3b5539d

Browse files
committed
Make to reverse argument order
1 parent 5b752da commit 3b5539d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LINEBot/SignatureValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ public static function validateSignature($json, $channelSecret, $signature)
3434
if (empty($signature)) {
3535
throw new InvalidSignatureException('Signature must not be empty');
3636
}
37-
return hash_equals($signature, base64_encode(hash_hmac('sha256', $json, $channelSecret, true)));
37+
return hash_equals(base64_encode(hash_hmac('sha256', $json, $channelSecret, true)), $signature);
3838
}
3939
}

0 commit comments

Comments
 (0)