• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/virtual.php
  • Класс: CWebDavVirtual
  • Вызов: CWebDavVirtual::CheckRights
function CheckRights($method = "", $strong = false, $path = "")
{
	$result = true; 
	if (!parent::CheckRights($method, $strong))
	{
		$result = false; 
		$GLOBALS["APPLICATION"]->ThrowException(GetMessage('WD_ACCESS_DENIED'), 'ACCESS_DENIED');
	}
	elseif (!empty($path))
	{
		$path = $this->_udecode($path);
		$strFileName = basename($path);
		$extention = mb_strtolower(strrchr($strFileName, '.'));
		if (in_array($method, array("COPY", "MOVE", "PUT")))
		{
			if (IsFileUnsafe($strFileName) || $strFileName == "index.php")
			{
				$result = false; 
				$GLOBALS['APPLICATION']->ThrowException(GetMessage("WD_FILE_ERROR14"), "FORBIDDEN_NAME"); 
			}
		}
	}
	return $result; 
}