diff --git a/Controller/Settings/Index.php b/Controller/Settings/Index.php index 15523bb..4e23b77 100644 --- a/Controller/Settings/Index.php +++ b/Controller/Settings/Index.php @@ -51,6 +51,9 @@ public function execute(): ResponseHttp { $data = json_decode($this->request->getContent(), true); $tokenFromCache = $this->cache->load(SetUpdateSettingsMessage::CACHE_NAME); + if (empty($tokenFromCache)) { + return $this->error('Can not find token in cache.'); + } $this->cache->remove(SetUpdateSettingsMessage::CACHE_NAME); $signature = $this->request->getHeader('x-signature');