Skip to content

Commit

Permalink
fix broken token checks in finder indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
SniperSister committed Jul 5, 2020
1 parent 8d6d02d commit 3cca9d5
Showing 1 changed file with 18 additions and 3 deletions.
Expand Up @@ -62,7 +62,12 @@ public function start()
$this->app->allowCache(false);

// Check for a valid token. If invalid, send a 403 with the error message.
Session::checkToken('request') or static::sendResponse(new \Exception(Text::_('JINVALID_TOKEN_NOTICE'), 403));
if (!Session::checkToken('request'))
{
static::sendResponse(new \Exception(Text::_('JINVALID_TOKEN_NOTICE'), 403));

return;
}

// Put in a buffer to silence noise.
ob_start();
Expand Down Expand Up @@ -130,7 +135,12 @@ public function batch()
$this->app->allowCache(false);

// Check for a valid token. If invalid, send a 403 with the error message.
Session::checkToken('request') or static::sendResponse(new \Exception(Text::_('JINVALID_TOKEN_NOTICE'), 403));
if (!Session::checkToken('request'))
{
static::sendResponse(new \Exception(Text::_('JINVALID_TOKEN_NOTICE'), 403));

return;
}

// Put in a buffer to silence noise.
ob_start();
Expand Down Expand Up @@ -246,7 +256,12 @@ public function optimize()
$this->app->allowCache(false);

// Check for a valid token. If invalid, send a 403 with the error message.
Session::checkToken('request') or static::sendResponse(new \Exception(Text::_('JINVALID_TOKEN_NOTICE'), 403));
if (!Session::checkToken('request'))
{
static::sendResponse(new \Exception(Text::_('JINVALID_TOKEN_NOTICE'), 403));

return;
}

// Put in a buffer to silence noise.
ob_start();
Expand Down

0 comments on commit 3cca9d5

Please sign in to comment.