From 20991af127688b667753e31afe5b6867af88c846 Mon Sep 17 00:00:00 2001 From: freek Date: Wed, 28 Nov 2018 21:07:07 +0100 Subject: [PATCH] nitpick --- src/WebSockets/Channels/Channel.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/WebSockets/Channels/Channel.php b/src/WebSockets/Channels/Channel.php index 892ad1a..6510c8d 100644 --- a/src/WebSockets/Channels/Channel.php +++ b/src/WebSockets/Channels/Channel.php @@ -30,15 +30,13 @@ class Channel protected function verifySignature(ConnectionInterface $connection, stdClass $payload) { - $auth = $payload->auth; - $signature = "{$connection->socketId}:{$this->channelId}"; if (isset($payload->channel_data)) { $signature .= ":{$payload->channel_data}"; } - if (str_after($auth, ':') !== hash_hmac('sha256', $signature, $connection->client->appSecret)) { + if (str_after($payload->auth, ':') !== hash_hmac('sha256', $signature, $connection->client->appSecret)) { throw new InvalidSignature(); } }