Skip to content

Commit

Permalink
add validate in connection flow
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-zhang-awx committed Jan 6, 2025
1 parent 05ecce2 commit 7f1feca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Controller/Settings/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7f1feca

Please sign in to comment.