1C-Bitrix 25.700.0
|
Функции | |
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 | ( | string | $data | ) |
См. определение в файле quickway.php строка 208
decryptData | ( | string | $data, |
string | $key ) |
См. определение в файле quickway.php строка 213
getMemcacheStorage | ( | array | $config | ) |
См. определение в файле quickway.php строка 95
getRedisStorage | ( | array | $config | ) |
См. определение в файле quickway.php строка 108
getStorage | ( | array | $config | ) |
См. определение в файле quickway.php строка 145
hasScope | ( | string | $prefix, |
string | $userToken, | ||
string | $scope, | ||
\Redis|\Memcache | $storage ) |
См. определение в файле quickway.php строка 164
if(! $config) isValidSign | ( | string | $key, |
string | $signedUserToken ) |
См. определение в файле quickway.php строка 75
if(empty( $encryptedData)) if(str_starts_with($_SERVER['SCRIPT_NAME'], '/mobile/ajax.php')) readConfig | ( | ) |
См. определение в файле quickway.php строка 24
См. определение в файле quickway.php строка 300
$attachmentName = $decryptedData['l'] ?? null |
См. определение в файле quickway.php строка 306
$bFileId = $storedData['id'] |
См. определение в файле quickway.php строка 304
$config = readConfig() |
См. определение в файле quickway.php строка 69
$contentType = $storedData['contentType'] |
См. определение в файле quickway.php строка 301
$cookiePrefix = $config['cookiePrefix'] ?? 'BITRIX_SM' |
См. определение в файле quickway.php строка 248
if (isValidSign( $key, $signedUserToken)===false) $decryptedData = decryptData($encryptedData, $key) |
См. определение в файле quickway.php строка 264
$dir = $storedData['dir'] |
См. определение в файле quickway.php строка 303
if(!empty($_GET['ts']) && $_GET['ts']==='bxviewer') if (!empty( $_GET[ '_gen'])) $encryptedData = $_GET['_esd'] ?? null |
См. определение в файле quickway.php строка 13
$expirationTime = $storedData['expirationTime'] |
См. определение в файле quickway.php строка 302
if (!hasScope( $config[ 'storage'][ 'keyPrefix'], $userToken, $decryptedData[ 'scope'], $storage)) $fileInfoKey = "{$config['storage']['keyPrefix']}file:{$decryptedData['fileId']}" |
См. определение в файле quickway.php строка 284
$fileName = $storedData['filename'] |
См. определение в файле quickway.php строка 305
if (empty( $signedUserToken)) $key = $config['key'] |
См. определение в файле quickway.php строка 257
$originalHeight = (int)$storedData['height'] ?: 0 |
См. определение в файле quickway.php строка 316
$originalWidth = (int)$storedData['width'] ?: 0 |
См. определение в файле quickway.php строка 315
См. определение в файле quickway.php строка 314
См. определение в файле quickway.php строка 313
$signedUserToken = $_COOKIE["{$cookiePrefix}_DTOKEN"] ?? null |
См. определение в файле quickway.php строка 251
if (empty( $decryptedData)) $storage = getStorage($config['storage']) |
См. определение в файле quickway.php строка 270
$storedData = $storage->get($fileInfoKey) |
См. определение в файле quickway.php строка 285
if (! $storage) $userToken = explode('.', $signedUserToken, 2)[0] |
См. определение в файле quickway.php строка 276
die |
См. определение в файле quickway.php строка 367
if (empty( $storedData)) try |
См. определение в файле quickway.php строка 291