diff --git a/lib/Controller/HarpController.php b/lib/Controller/HarpController.php index be3d2814..bb91d700 100644 --- a/lib/Controller/HarpController.php +++ b/lib/Controller/HarpController.php @@ -58,7 +58,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(),