diff --git a/lib/Controller/HarpController.php b/lib/Controller/HarpController.php index 7f443012..9540a058 100644 --- a/lib/Controller/HarpController.php +++ b/lib/Controller/HarpController.php @@ -60,7 +60,7 @@ private function validateHarpSharedKey(ExApp $exApp): bool { } $headerHarpKey = $this->request->getHeader('harp-shared-key'); - if ($headerHarpKey === '' || $headerHarpKey !== $harpKey) { + if ($headerHarpKey === '' || !hash_equals($harpKey, $headerHarpKey)) { $this->logger->error('Harp shared key is not valid'); $this->throttler->registerAttempt(Application::APP_ID, $this->request->getRemoteAddress(), [ 'appid' => $exApp->getAppid(),