1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Файл quickway.php

См. исходные тексты.

Функции

if(empty($encryptedData)) if(str_starts_with( $_SERVER[ 'SCRIPT_NAME'], '/mobile/ajax.php')) readConfig ()
if(! $config) isValidSign (string $key, string $signedUserToken)
 getMemcacheStorage (array $config)
 getRedisStorage (array $config)
 getStorage (array $config)
 hasScope (string $prefix, string $userToken, string $scope, \Redis|\Memcache $storage)
 decodeJson (string $data)
 decryptData (string $data, string $key)

Переменные

if(!empty( $_GET[ 'ts']) &&$_GET[ 'ts']==='bxviewer') if(!empty($_GET['_gen'])) $encryptedData = $_GET['_esd'] ?? null
 $config = readConfig()
 $cookiePrefix = $config['cookiePrefix'] ?? 'BITRIX_SM'
 $signedUserToken = $_COOKIE["{$cookiePrefix}_DTOKEN"] ?? null
if(empty($signedUserToken)) $key = $config['key']
if(isValidSign($key, $signedUserToken)===false$decryptedData = decryptData($encryptedData, $key)
if(empty($decryptedData)) $storage = getStorage($config['storage'])
if(! $storage) $userToken = explode('.', $signedUserToken, 2)[0]
if(!hasScope($config['storage']['keyPrefix'], $userToken, $decryptedData['scope'], $storage)) $fileInfoKey = "{$config['storage']['keyPrefix']}file:{$decryptedData['fileId']}"
 $storedData = $storage->get($fileInfoKey)
if(empty($storedData)) try
catch(\JsonException $e) $accelRedirectPath = $storedData['path']
 $contentType = $storedData['contentType']
 $expirationTime = $storedData['expirationTime']
 $dir = $storedData['dir']
 $bFileId = $storedData['id']
 $fileName = $storedData['filename']
 $attachmentName = $decryptedData['l'] ?? null
if(time() > $expirationTime) $requestedWidth = isset($_GET['width']) ? (int)$_GET['width'] : 0
 $requestedHeight = isset($_GET['height']) ? (int)$_GET['height'] : 0
 $originalWidth = (int)$storedData['width'] ?: 0
 $originalHeight = (int)$storedData['height'] ?: 0
 die

Функции

◆ decodeJson()

decodeJson ( string $data)

См. определение в файле quickway.php строка 208

◆ decryptData()

decryptData ( string $data,
string $key )

См. определение в файле quickway.php строка 213

◆ getMemcacheStorage()

getMemcacheStorage ( array $config)

См. определение в файле quickway.php строка 95

◆ getRedisStorage()

getRedisStorage ( array $config)

См. определение в файле quickway.php строка 108

◆ getStorage()

getStorage ( array $config)

См. определение в файле quickway.php строка 145

◆ hasScope()

hasScope ( string $prefix,
string $userToken,
string $scope,
\Redis|\Memcache $storage )
См. также
\Bitrix\Disk\QuickAccess\Storage\RedisScopeStoragehasScope
\Bitrix\Disk\QuickAccess\Storage\ScopeStoragehasScope

См. определение в файле quickway.php строка 164

◆ isValidSign()

if(! $config) isValidSign ( string $key,
string $signedUserToken )

См. определение в файле quickway.php строка 75

◆ readConfig()

if(empty( $encryptedData)) if(str_starts_with($_SERVER['SCRIPT_NAME'], '/mobile/ajax.php')) readConfig ( )
См. также
\Bitrix\Main\Config\Configuration::CONFIGURATION_FILE_PATH
\Bitrix\Main\Config\Configuration::CONFIGURATION_FILE_EXTRA
\Bitrix\Disk\QuickAccess\Configuration::CONFIG_SECTION
\Bitrix\Disk\QuickAccess\Configuration::CONFIG_STORAGE

См. определение в файле quickway.php строка 24

Переменные

◆ $accelRedirectPath

catch (\JsonException $e) $accelRedirectPath = $storedData['path']

См. определение в файле quickway.php строка 300

◆ $attachmentName

$attachmentName = $decryptedData['l'] ?? null

См. определение в файле quickway.php строка 306

◆ $bFileId

$bFileId = $storedData['id']

См. определение в файле quickway.php строка 304

◆ $config

$config = readConfig()

См. определение в файле quickway.php строка 69

◆ $contentType

$contentType = $storedData['contentType']

См. определение в файле quickway.php строка 301

◆ $cookiePrefix

$cookiePrefix = $config['cookiePrefix'] ?? 'BITRIX_SM'

См. определение в файле quickway.php строка 248

◆ $decryptedData

if (isValidSign( $key, $signedUserToken)===false) $decryptedData = decryptData($encryptedData, $key)

См. определение в файле quickway.php строка 264

◆ $dir

$dir = $storedData['dir']

См. определение в файле quickway.php строка 303

◆ $encryptedData

if(!empty($_GET['ts']) && $_GET['ts']==='bxviewer') if (!empty( $_GET[ '_gen'])) $encryptedData = $_GET['_esd'] ?? null

См. определение в файле quickway.php строка 13

◆ $expirationTime

$expirationTime = $storedData['expirationTime']

См. определение в файле quickway.php строка 302

◆ $fileInfoKey

if (!hasScope( $config[ 'storage'][ 'keyPrefix'], $userToken, $decryptedData[ 'scope'], $storage)) $fileInfoKey = "{$config['storage']['keyPrefix']}file:{$decryptedData['fileId']}"
См. также
\Bitrix\Disk\QuickAccess\Storage\ScopeStorage::getFileKey

См. определение в файле quickway.php строка 284

◆ $fileName

$fileName = $storedData['filename']

См. определение в файле quickway.php строка 305

◆ $key

if (empty( $signedUserToken)) $key = $config['key']

◆ $originalHeight

$originalHeight = (int)$storedData['height'] ?: 0

См. определение в файле quickway.php строка 316

◆ $originalWidth

$originalWidth = (int)$storedData['width'] ?: 0

См. определение в файле quickway.php строка 315

◆ $requestedHeight

$requestedHeight = isset($_GET['height']) ? (int)$_GET['height'] : 0

См. определение в файле quickway.php строка 314

◆ $requestedWidth

if (time() > $expirationTime) $requestedWidth = isset($_GET['width']) ? (int)$_GET['width'] : 0

См. определение в файле quickway.php строка 313

◆ $signedUserToken

$signedUserToken = $_COOKIE["{$cookiePrefix}_DTOKEN"] ?? null
См. также
\Bitrix\Disk\QuickAccess\ScopeTokenService::COOKIE_NAME

См. определение в файле quickway.php строка 251

◆ $storage

if (empty( $decryptedData)) $storage = getStorage($config['storage'])

См. определение в файле quickway.php строка 270

◆ $storedData

$storedData = $storage->get($fileInfoKey)

См. определение в файле quickway.php строка 285

◆ $userToken

if (! $storage) $userToken = explode('.', $signedUserToken, 2)[0]

См. определение в файле quickway.php строка 276

◆ die

die

См. определение в файле quickway.php строка 367

◆ try

if (empty( $storedData)) try
Инициализатор
{
$storedData = json_decode($storedData, true, 3, JSON_THROW_ON_ERROR)
$storedData
Определения quickway.php:285

См. определение в файле quickway.php строка 291