• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/internals/basecomponent.php
  • Класс: BitrixDiskInternalsBaseComponent
  • Вызов: BaseComponent::checkAction
protected function checkAction()
{
	if($this->errorCollection->hasErrors())
	{
		$this->sendJsonErrorResponse();
	}
	$description = $this->getActionDescription();

	//if does not exist check_csrf_token we have to check csrf for only POST method.
	if($description['check_csrf_token'] === true || ($this->request->isPost() && !isset($description['check_csrf_token'])))
	{
		if(!check_bitrix_sessid())
		{
			if($this->isAjaxRequest())
			{
				$this->sendJsonAccessDeniedResponse('Wrong csrf token');
			}
			else
			{
				$this->showAccessDenied();
			}
		}
	}
}