Example #1
0
        $GLOBALS[___2022025961(540)]->SetAuthResult($_1491456351);
    } elseif (!$GLOBALS[___2022025961(541)]->{$GLOBALS}['_____499363063'][36]()) {
        $GLOBALS[___2022025961(542)]->LoginHitByHash();
    }
}
if (($_1760188136 = $GLOBALS[___2022025961(543)]->GetParam(___2022025961(544))) !== null) {
    $_1760639291 = \Bitrix\Main\Authentication\ApplicationManager::getInstance();
    if ($_1760639291->checkScope($_1760188136) !== true) {
        CHTTP::SetStatus(___2022025961(545));
        die;
    }
}
if (!$GLOBALS['____1709102065'][139](___2022025961(546)) || ADMIN_SECTION !== true) {
    $_751848921 = ___2022025961(547);
    if ($GLOBALS['____1709102065'][140]($_REQUEST[___2022025961(548)]) && $_REQUEST[___2022025961(549)] != ___2022025961(550) && $GLOBALS[___2022025961(551)]->{$GLOBALS}['_____499363063'][37](___2022025961(552))) {
        $_822381766 = new Bitrix\Main\Security\Sign\Signer();
        try {
            $_1344278139 = $_822381766->unsign($_REQUEST[___2022025961(553)], ___2022025961(554) . bitrix_sessid());
            $_1711870086 = CSiteTemplate::$GLOBALS['_____499363063'][38]($_1344278139);
            if ($_151889002 = $_1711870086->{$GLOBALS}['_____499363063'][39]()) {
                $_751848921 = $_151889002[___2022025961(555)];
                if (isset($_GET[___2022025961(556)]) && $_GET[___2022025961(557)] == ___2022025961(558) && $GLOBALS[___2022025961(559)]->{$GLOBALS}['_____499363063'][40](___2022025961(560))) {
                    $GLOBALS['____1709102065'][141](___2022025961(561), true);
                }
            }
        } catch (\Bitrix\Main\Security\Sign\BadSignatureException $_584874849) {
        }
    }
    if ($_751848921 == ___2022025961(562)) {
        $_751848921 = CSite::GetCurTemplate();
    }
Example #2
0
<?php

if (empty($_POST['parameters'])) {
    echo 'no parameters found';
    return;
}
if (isset($_REQUEST['site_id']) && !empty($_REQUEST['site_id'])) {
    if (!is_string($_REQUEST['site_id'])) {
        die;
    }
    if (preg_match('/^[a-z0-9_]{2}$/i', $_REQUEST['site_id']) === 1) {
        define('SITE_ID', $_REQUEST['site_id']);
    }
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
$signer = new \Bitrix\Main\Security\Sign\Signer();
$parameters = $signer->unsign($_POST['parameters'], 'bx.bd.products.recommendation');
$template = $signer->unsign($_POST['template'], 'bx.bd.products.recommendation');
$APPLICATION->IncludeComponent("bitrix:catalog.bigdata.products", $template, unserialize(base64_decode($parameters)), false);
Example #3
0
         }
     }
 }
 Array_Walk($_REQUEST, '__UnEscapeTmp');
 $arParams = array();
 $params = Explode(",", $_REQUEST["params"]);
 foreach ($params as $param) {
     list($key, $val) = Explode(":", $param);
     $arParams[$key] = $val;
 }
 $arParams["pe"] = IntVal($arParams["pe"]);
 if ($arParams["pe"] <= 0 || $arParams["pe"] > 50) {
     $arParams["pe"] = 10;
 }
 $arParams["gf"] = IntVal($arParams["gf"]);
 $signer = new \Bitrix\Main\Security\Sign\Signer();
 try {
     $nt = $signer->unsign($arParams["nt"]);
     $arParams["NAME_TEMPLATE"] = str_replace(array("#EMAIL#", "#LOGIN#", "#NOBR#", "#/NOBR#", "#COMMA#"), array(" ", " ", " ", " ", ","), trim($nt));
 } catch (\Bitrix\Main\Security\Sign\BadSignatureException $e) {
     $arParams["NAME_TEMPLATE"] = str_replace("#COMMA#", ",", CSite::GetNameFormat(false));
 }
 $arParams['NAME_TEMPLATE'] .= $bIntranet ? ' <#EMAIL#>' : '';
 $arParams['NAME_TEMPLATE'] .= " [#ID#]";
 try {
     $sl = $signer->unsign($arParams["sl"]);
     $bUseLogin = trim($sl) != "N";
 } catch (\Bitrix\Main\Security\Sign\BadSignatureException $e) {
     $bUseLogin = false;
 }
 if (CModule::IncludeModule('extranet')) {
Example #4
0
$arParams["NOTIFY_TEXT"] = trim($arParams["NOTIFY_TEXT"]);
$arParams["ERROR_MESSAGE"] = trim($arParams["ERROR_MESSAGE"]);
$arParams["OK_MESSAGE"] = trim($arParams["OK_MESSAGE"]);
// Template params
$arParams["VISIBLE_RECORDS_COUNT"] = !!$arParams["NAV_RESULT"] ? intval($arParams["VISIBLE_RECORDS_COUNT"]) : 0;
$arParams["TEMPLATE_ID"] = !!$arParams["TEMPLATE_ID"] ? $arParams["TEMPLATE_ID"] : 'COMMENT_' . $arParams["ENTITY_XML_ID"] . '_';
$arParams["AVATAR_SIZE"] = $arParams["AVATAR_SIZE"] > 0 ? $arParams["AVATAR_SIZE"] : 39;
//$arParams["IMAGE_SIZE"] = ($arParams["IMAGE_SIZE"] > 0 ? $arParams["IMAGE_SIZE"] : 30);
$arParams['SHOW_MINIMIZED'] = $arParams['SHOW_MINIMIZED'] == "Y" ? "Y" : "N";
$arParams["PATH_TO_USER"] = trim($arParams["PATH_TO_USER"]);
$arParams["NAME_TEMPLATE"] = !!$_REQUEST["NAME_TEMPLATE"] ? $_REQUEST["NAME_TEMPLATE"] : CSite::GetNameFormat();
$arParams["SHOW_LOGIN"] = $_REQUEST["SHOW_LOGIN"] == "Y" ? "Y" : "N";
$arParams["DATE_TIME_FORMAT"] = trim($arParams["DATE_TIME_FORMAT"]);
$arParams["SHOW_POST_FORM"] = $arParams["SHOW_POST_FORM"] == "Y" ? "Y" : "N";
$arParams["BIND_VIEWER"] = $arParams["BIND_VIEWER"] == "Y" ? "Y" : "N";
$sign = new \Bitrix\Main\Security\Sign\Signer();
$arParams["SIGN"] = $sign->sign($arParams["ENTITY_XML_ID"], "main.post.list");
if ($arParams["VISIBLE_RECORDS_COUNT"] > 0) {
    if ($arParams["NAV_RESULT"]->bShowAll) {
        $arParams["VISIBLE_RECORDS_COUNT"] = 0;
    } else {
        if (array_key_exists($arResult['RESULT'], $arParams["RECORDS"])) {
            $arParams["VISIBLE_RECORDS_COUNT"] = count($arResult["MESSAGES"]);
        } else {
            if ($arParams["NAV_RESULT"]->NavRecordCount <= $arParams["VISIBLE_RECORDS_COUNT"]) {
                $arParams["VISIBLE_RECORDS_COUNT"] = $arParams["NAV_RESULT"]->NavRecordCount;
            } else {
                if (isset($_REQUEST["PAGEN_" . $arParams["NAV_RESULT"]->NavNum]) || isset($_REQUEST["FILTER"]) && $arParams["ENTITY_XML_ID"] == $_REQUEST["ENTITY_XML_ID"]) {
                    $arParams["VISIBLE_RECORDS_COUNT"] = 0;
                }
            }
Example #5
0
    die;
}
if ($_REQUEST['action'] === 'getUrlPreviewEditForm') {
    session_write_close();
    $urlMetadata = null;
    $userFieldId = filter_var($_REQUEST['userFieldId'], FILTER_VALIDATE_INT);
    $elementId = filter_var($_REQUEST['elementId'], FILTER_SANITIZE_STRING);
    if ($userFieldId === false) {
        die;
    }
    if (isset($_REQUEST['url'])) {
        $url = filter_var($_REQUEST['url'], FILTER_VALIDATE_URL);
        $urlMetadata = UrlPreview::getMetadataByUrl($url);
    } else {
        if (isset($_REQUEST['id'])) {
            $signer = new \Bitrix\Main\Security\Sign\Signer();
            try {
                $id = $signer->unsign($_REQUEST['id'], UrlPreview::SIGN_SALT);
            } catch (Bitrix\Main\SystemException $e) {
                die;
            }
            $metadata = UrlPreview::getMetadataAndHtmlByIds(array($id), true);
            if (isset($metadata[$id])) {
                $urlMetadata = $metadata[$id];
            }
        }
    }
    if (!isset($urlMetadata['ID'])) {
        die;
    }
    $userFieldParams = array('arUserField' => \CUserTypeEntity::getById($userFieldId), 'urlPreviewId' => $elementId);
Example #6
0
} else {
    $SITE_TEMPLATE = array();
    foreach ($_POST["SITE_TEMPLATE"] as $key => $val) {
        if ($USER->CanDoOperation('edit_php') || $_POST['selected_type'][$key] != 'php') {
            $cond = ConditionCompose($val, $key);
        } else {
            if (isset($arTemplates[$key])) {
                $cond = $arTemplates[$key];
            } else {
                continue;
            }
        }
        $SITE_TEMPLATE[$key] = array("TEMPLATE" => $val['TEMPLATE'], "SORT" => $val['SORT'], "CONDITION" => $cond);
    }
}
$signer = new Bitrix\Main\Security\Sign\Signer();
//templates
$arSiteTemplates = array();
$templateSigns = array();
$db_res = CSiteTemplate::GetList(array("sort" => "asc", "name" => "asc"), array("TYPE" => ""), array("ID", "NAME"));
while ($arRes = $db_res->GetNext()) {
    $arSiteTemplates[] = $arRes;
    $templateSigns[$arRes["ID"]] = $signer->sign($arRes["ID"], "template_preview" . bitrix_sessid());
}
$bFirst = true;
foreach ($SITE_TEMPLATE as $i => $val) {
    ConditionParse($val['CONDITION']);
    ?>
			<tr>
				<td>
					<select name="SITE_TEMPLATE[<?php 
Example #7
0
    }
}
//application password scope control
if (($applicationID = $GLOBALS["USER"]->GetParam("APPLICATION_ID")) !== null) {
    $appManager = \Bitrix\Main\Authentication\ApplicationManager::getInstance();
    if ($appManager->checkScope($applicationID) !== true) {
        CHTTP::SetStatus("403 Forbidden");
        die;
    }
}
//define the site template
if (!defined("ADMIN_SECTION") || ADMIN_SECTION !== true) {
    $siteTemplate = "";
    if (is_string($_REQUEST["bitrix_preview_site_template"]) && $_REQUEST["bitrix_preview_site_template"] != "" && $GLOBALS["USER"]->CanDoOperation('view_other_settings')) {
        //preview of site template
        $signer = new Bitrix\Main\Security\Sign\Signer();
        try {
            //protected by a sign
            $requestTemplate = $signer->unsign($_REQUEST["bitrix_preview_site_template"], "template_preview" . bitrix_sessid());
            $aTemplates = CSiteTemplate::GetByID($requestTemplate);
            if ($template = $aTemplates->Fetch()) {
                $siteTemplate = $template["ID"];
                //preview of unsaved template
                if (isset($_GET['bx_template_preview_mode']) && $_GET['bx_template_preview_mode'] == 'Y' && $GLOBALS["USER"]->CanDoOperation('edit_other_settings')) {
                    define("SITE_TEMPLATE_PREVIEW_MODE", true);
                }
            }
        } catch (\Bitrix\Main\Security\Sign\BadSignatureException $e) {
        }
    }
    if ($siteTemplate == "") {
Example #8
0
        $GLOBALS[___1197454902(519)]->SetAuthResult($_1929760705);
    } elseif (!$GLOBALS[___1197454902(520)]->{$GLOBALS}['_____392502543'][32]()) {
        $GLOBALS[___1197454902(521)]->LoginHitByHash();
    }
}
if (($_815491390 = $GLOBALS[___1197454902(522)]->GetParam(___1197454902(523))) !== null) {
    $_1092821469 = \Bitrix\Main\Authentication\ApplicationManager::getInstance();
    if ($_1092821469->checkScope($_815491390) !== true) {
        CHTTP::SetStatus(___1197454902(524));
        die;
    }
}
if (!$GLOBALS['____1580035060'][122](___1197454902(525)) || ADMIN_SECTION !== true) {
    $_799549483 = ___1197454902(526);
    if ($GLOBALS['____1580035060'][123]($_REQUEST[___1197454902(527)]) && $_REQUEST[___1197454902(528)] != ___1197454902(529) && $GLOBALS[___1197454902(530)]->{$GLOBALS}['_____392502543'][33](___1197454902(531))) {
        $_330022344 = new Bitrix\Main\Security\Sign\Signer();
        try {
            $_1566270309 = $_330022344->unsign($_REQUEST[___1197454902(532)], ___1197454902(533) . bitrix_sessid());
            $_388998021 = CSiteTemplate::$GLOBALS['_____392502543'][34]($_1566270309);
            if ($_1610143248 = $_388998021->{$GLOBALS}['_____392502543'][35]()) {
                $_799549483 = $_1610143248[___1197454902(534)];
                if (isset($_GET[___1197454902(535)]) && $_GET[___1197454902(536)] == ___1197454902(537) && $GLOBALS[___1197454902(538)]->{$GLOBALS}['_____392502543'][36](___1197454902(539))) {
                    $GLOBALS['____1580035060'][124](___1197454902(540), true);
                }
            }
        } catch (\Bitrix\Main\Security\Sign\BadSignatureException $_769113789) {
        }
    }
    if ($_799549483 == ___1197454902(541)) {
        $_799549483 = CSite::GetCurTemplate();
    }
Example #9
0
echo GetMessage("admin_lib_edit_save_title");
?>
" class="adm-btn-save">
<input <?php 
echo $dis ? "disabled" : "";
?>
 type="submit" name="apply" value="<?php 
echo GetMessage("admin_lib_edit_apply");
?>
" title="<?php 
GetMessage("admin_lib_edit_apply_title");
?>
">
<?php 
if (($USER->CanDoOperation('edit_other_settings') || $USER->CanDoOperation('lpa_template_edit')) && !empty($ID) && !$isEditingMessageThemePage) {
    $signer = new Bitrix\Main\Security\Sign\Signer();
    $sign = $signer->sign($ID, "template_preview" . bitrix_sessid());
    ?>
<input type="button" value="<?php 
    echo GetMessage('FILEMAN_PREVIEW_TEMPLATE');
    ?>
" name="template_preview" onclick="preview_template('<?php 
    echo htmlspecialcharsbx(CUtil::JSEscape($ID));
    ?>
', '<?php 
    echo bitrix_sessid();
    ?>
', '<?php 
    echo htmlspecialcharsbx(CUtil::JSEscape($sign));
    ?>
');" title="<?php 
Example #10
0
define("NO_AGENT_STATISTIC", "Y");
define("NO_AGENT_CHECK", true);
define("DisableEventsCheck", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
/**
 * Bitrix vars
 * @global CUser $GLOBALS["USER"]
 * @global CMain $APPLICATION
 * @var array $arParams
 */
$arParams = array();
$arParams["AVATAR_SIZE"] = intval($_REQUEST["AVATAR_SIZE"]);
$arParams["AVATAR_SIZE"] = $arParams["AVATAR_SIZE"] > 0 ? $arParams["AVATAR_SIZE"] : 42;
$arParams["NAME_TEMPLATE"] = !!$_REQUEST["NAME_TEMPLATE"] ? $_REQUEST["NAME_TEMPLATE"] : CSite::GetNameFormat();
$arParams["SHOW_LOGIN"] = $_REQUEST["SHOW_LOGIN"] == "Y" ? "Y" : "N";
$sign = new \Bitrix\Main\Security\Sign\Signer();
$arParams["SIGN"] = $sign->unsign($_REQUEST["sign"], "main.post.list");
if (!is_array($_SESSION["UC_LAST_ACTIVITY"])) {
    $_SESSION["UC_LAST_ACTIVITY"] = array("TIME" => 0, "ENTITY_XML_ID" => $_REQUEST["ENTITY_XML_ID"]);
}
if (check_bitrix_sessid() && $_REQUEST["MODE"] == "PUSH&PULL" && $GLOBALS["USER"]->IsAuthorized() && $arParams["SIGN"] == $_REQUEST["ENTITY_XML_ID"] && ($_SESSION["UC_ACTIVITY"]["ENTITY_XML_ID"] != $_REQUEST["ENTITY_XML_ID"] || time() - $_SESSION["UC_ACTIVITY"]["TIME"] > 10) && CModule::IncludeModule("pull") && CPullOptions::GetNginxStatus()) {
    $_SESSION["UC_ACTIVITY"]["TIME"] = time();
    $_SESSION["UC_ACTIVITY"]["ENTITY_XML_ID"] = $_REQUEST["ENTITY_XML_ID"];
    $dbUser = CUser::GetList($sort_by = array('ID' => 'desc'), $dummy = '', array("ID" => $GLOBALS["USER"]->GetId()), array("FIELDS" => array("ID", "LAST_NAME", "NAME", "SECOND_NAME", "LOGIN", "PERSONAL_PHOTO", "PERSONAL_GENDER")));
    $arUser = array();
    if ($dbUser && ($arUser = $dbUser->GetNext()) && intval($arUser["PERSONAL_PHOTO"]) > 0) {
        $arUser["PERSONAL_PHOTO_file"] = CFile::GetFileArray($arUser["PERSONAL_PHOTO"]);
        $arUser["PERSONAL_PHOTO_resized_30"] = CFile::ResizeImageGet($arUser["PERSONAL_PHOTO_file"], array("width" => $arParams["AVATAR_SIZE"], "height" => $arParams["AVATAR_SIZE"]), BX_RESIZE_IMAGE_EXACT, false, false, true);
    }
    $arUserInfo = !!$arUser ? $arUser : array("PERSONAL_PHOTO_resized_30" => array("src" => ""));
    $arUserInfo["NAME_FORMATED"] = CUser::FormatName($arParams["NAME_TEMPLATE"], array("NAME" => $arUserInfo["~NAME"], "LAST_NAME" => $arUserInfo["~LAST_NAME"], "SECOND_NAME" => $arUserInfo["~SECOND_NAME"], "LOGIN" => $arUserInfo["~LOGIN"], "NAME_LIST_FORMATTED" => ""), $arParams["SHOW_LOGIN"] != "N" ? true : false, false);
Example #11
0
        $GLOBALS[___1507790831(519)]->SetAuthResult($_136749631);
    } elseif (!$GLOBALS[___1507790831(520)]->{$GLOBALS}['_____707901553'][32]()) {
        $GLOBALS[___1507790831(521)]->LoginHitByHash();
    }
}
if (($_1797948689 = $GLOBALS[___1507790831(522)]->GetParam(___1507790831(523))) !== null) {
    $_1827704438 = \Bitrix\Main\Authentication\ApplicationManager::getInstance();
    if ($_1827704438->checkScope($_1797948689) !== true) {
        CHTTP::SetStatus(___1507790831(524));
        die;
    }
}
if (!$GLOBALS['____967106059'][122](___1507790831(525)) || ADMIN_SECTION !== true) {
    $_354377807 = ___1507790831(526);
    if ($GLOBALS['____967106059'][123]($_REQUEST[___1507790831(527)]) && $_REQUEST[___1507790831(528)] != ___1507790831(529) && $GLOBALS[___1507790831(530)]->{$GLOBALS}['_____707901553'][33](___1507790831(531))) {
        $_589362157 = new Bitrix\Main\Security\Sign\Signer();
        try {
            $_1558665492 = $_589362157->unsign($_REQUEST[___1507790831(532)], ___1507790831(533) . bitrix_sessid());
            $_1837691366 = CSiteTemplate::$GLOBALS['_____707901553'][34]($_1558665492);
            if ($_93574762 = $_1837691366->{$GLOBALS}['_____707901553'][35]()) {
                $_354377807 = $_93574762[___1507790831(534)];
                if (isset($_GET[___1507790831(535)]) && $_GET[___1507790831(536)] == ___1507790831(537) && $GLOBALS[___1507790831(538)]->{$GLOBALS}['_____707901553'][36](___1507790831(539))) {
                    $GLOBALS['____967106059'][124](___1507790831(540), true);
                }
            }
        } catch (\Bitrix\Main\Security\Sign\BadSignatureException $_938947383) {
        }
    }
    if ($_354377807 == ___1507790831(541)) {
        $_354377807 = CSite::GetCurTemplate();
    }
Example #12
0
        $GLOBALS[___47739928(540)]->SetAuthResult($_1957353308);
    } elseif (!$GLOBALS[___47739928(541)]->{$GLOBALS}['_____578075656'][36]()) {
        $GLOBALS[___47739928(542)]->LoginHitByHash();
    }
}
if (($_1209060292 = $GLOBALS[___47739928(543)]->GetParam(___47739928(544))) !== null) {
    $_752285516 = \Bitrix\Main\Authentication\ApplicationManager::getInstance();
    if ($_752285516->checkScope($_1209060292) !== true) {
        CHTTP::SetStatus(___47739928(545));
        die;
    }
}
if (!$GLOBALS['____445116793'][139](___47739928(546)) || ADMIN_SECTION !== true) {
    $_1371947985 = ___47739928(547);
    if ($GLOBALS['____445116793'][140]($_REQUEST[___47739928(548)]) && $_REQUEST[___47739928(549)] != ___47739928(550) && $GLOBALS[___47739928(551)]->{$GLOBALS}['_____578075656'][37](___47739928(552))) {
        $_27265484 = new Bitrix\Main\Security\Sign\Signer();
        try {
            $_2006384054 = $_27265484->unsign($_REQUEST[___47739928(553)], ___47739928(554) . bitrix_sessid());
            $_545859448 = CSiteTemplate::$GLOBALS['_____578075656'][38]($_2006384054);
            if ($_1019111333 = $_545859448->{$GLOBALS}['_____578075656'][39]()) {
                $_1371947985 = $_1019111333[___47739928(555)];
                if (isset($_GET[___47739928(556)]) && $_GET[___47739928(557)] == ___47739928(558) && $GLOBALS[___47739928(559)]->{$GLOBALS}['_____578075656'][40](___47739928(560))) {
                    $GLOBALS['____445116793'][141](___47739928(561), true);
                }
            }
        } catch (\Bitrix\Main\Security\Sign\BadSignatureException $_180757727) {
        }
    }
    if ($_1371947985 == ___47739928(562)) {
        $_1371947985 = CSite::GetCurTemplate();
    }
Example #13
0
    $arResult["FOR_INTRANET"] = false;
    if (\Bitrix\Main\ModuleManager::isModuleInstalled("intranet") || \Bitrix\Main\ModuleManager::isModuleInstalled("rest")) {
        $arResult["FOR_INTRANET"] = true;
    }
    if (\Bitrix\Main\Loader::includeModule("socialservices") && $arResult["ALLOW_SOCSERV_AUTHORIZATION"] == 'Y') {
        $oAuthManager = new CSocServAuthManager();
        $arServices = $oAuthManager->GetActiveAuthServices(array('BACKURL' => $this->arParams['~CURRENT_PAGE'], 'FOR_INTRANET' => $arResult['FOR_INTRANET']));
        if (!empty($arServices)) {
            $APPLICATION->IncludeComponent("bitrix:socserv.auth.form", "flat", array("AUTH_SERVICES" => $arServices, "AUTH_URL" => $arParams["~CURRENT_PAGE"], "POST" => $arResult["POST"]), $component, array("HIDE_ICONS" => "Y"));
        }
    }
    ?>
</div>

<?php 
    $signer = new \Bitrix\Main\Security\Sign\Signer();
    $signedParams = $signer->sign(base64_encode(serialize($arParams)), 'sale.order.ajax');
    $messages = \Bitrix\Main\Localization\Loc::loadLanguageFile(__FILE__);
    ?>

<script type="text/javascript">
	BX.message(<?php 
    echo CUtil::PhpToJSObject($messages);
    ?>
);
	BX.Sale.OrderAjaxComponent.init({
		result: <?php 
    echo CUtil::PhpToJSObject($arResult['JS_DATA']);
    ?>
,
		locations: <?php 
Example #14
0
		bx_rcm_recommndation_event_attaching(BX('<?php 
echo $injectId;
?>
_items'));
	});

</script>

<?

if (isset($arResult['REQUEST_ITEMS']))
{
	CJSCore::Init(array('ajax'));

	// component parameters
	$signer = new \Bitrix\Main\Security\Sign\Signer;
	$signedParameters = $signer->sign(
		base64_encode(serialize($arResult['_ORIGINAL_PARAMS'])),
		'bx.bd.products.recommendation'
	);
	$signedTemplate = $signer->sign($arResult['RCM_TEMPLATE'], 'bx.bd.products.recommendation');

	?>

	<span id="<?php 
echo $injectId;
?>
" class="bigdata_recommended_products_container"></span>

	<script type="application/javascript">
Example #15
0
        $GLOBALS[___1476597692(831)]->SetAuthResult($_877262712);
    } elseif (!$GLOBALS[___1476597692(832)]->{$GLOBALS}['_____266107269'][92]()) {
        $GLOBALS[___1476597692(833)]->LoginHitByHash();
    }
}
if (($_1984049566 = $GLOBALS[___1476597692(834)]->GetParam(___1476597692(835))) !== null) {
    $_696534207 = \Bitrix\Main\Authentication\ApplicationManager::getInstance();
    if ($_696534207->checkScope($_1984049566) !== true) {
        CHTTP::SetStatus(___1476597692(836));
        die;
    }
}
if (!$GLOBALS['____1574875487'][189](___1476597692(837)) || ADMIN_SECTION !== true) {
    $_1535779998 = ___1476597692(838);
    if ($GLOBALS['____1574875487'][190]($_REQUEST[___1476597692(839)]) && $_REQUEST[___1476597692(840)] != ___1476597692(841) && $GLOBALS[___1476597692(842)]->{$GLOBALS}['_____266107269'][93](___1476597692(843))) {
        $_1444976600 = new Bitrix\Main\Security\Sign\Signer();
        try {
            $_811421891 = $_1444976600->unsign($_REQUEST[___1476597692(844)], ___1476597692(845) . bitrix_sessid());
            $_892847402 = CSiteTemplate::$GLOBALS['_____266107269'][94]($_811421891);
            if ($_1604359512 = $_892847402->{$GLOBALS}['_____266107269'][95]()) {
                $_1535779998 = $_1604359512[___1476597692(846)];
                if (isset($_GET[___1476597692(847)]) && $_GET[___1476597692(848)] == ___1476597692(849) && $GLOBALS[___1476597692(850)]->{$GLOBALS}['_____266107269'][96](___1476597692(851))) {
                    $GLOBALS['____1574875487'][191](___1476597692(852), true);
                }
            }
        } catch (\Bitrix\Main\Security\Sign\BadSignatureException $_2136264297) {
        }
    }
    if ($_1535779998 == ___1476597692(853)) {
        $_1535779998 = CSite::GetCurTemplate();
    }
Example #16
0
 public static function extractToken($token)
 {
     $signer = new \Bitrix\Main\Security\Sign\Signer();
     try {
         $unsigned = $signer->unsign($token, self::TOKEN_SALT);
         $result = explode('|', $unsigned);
     } catch (\Exception $e) {
         $result = false;
     }
     return $result;
 }
Example #17
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (IntVal($arParams["PAGE_ELEMENTS"]) <= 0) {
    $arParams["PAGE_ELEMENTS"] = 10;
}
$signer = new \Bitrix\Main\Security\Sign\Signer();
$arParams["ADDITIONAL_VALUES"] = "pe:" . $arParams["PAGE_ELEMENTS"] . ",";
$arParams["ADDITIONAL_VALUES"] .= "gf:" . $arParams["GROUP_ID"] . ",";
$nt = str_replace(",", "#COMMA#", $arParams["NAME_TEMPLATE"]);
$arParams["ADDITIONAL_VALUES"] .= "nt:" . $signer->sign($nt) . ",";
$sl = $arParams["SHOW_LOGIN"];
$arParams["ADDITIONAL_VALUES"] .= "sl:" . $signer->sign($sl) . ",";
if (IsModuleInstalled("extranet") && strlen(CExtranet::GetExtranetSiteID()) > 0) {
    $arParams["ADDITIONAL_VALUES"] .= "ex:" . $arParams["EXTRANET"] . ",";
    $arParams["ADDITIONAL_VALUES"] .= "site:" . SITE_ID . "";
}
$arParams["~ADDITIONAL_VALUES"] = $arParams["ADDITIONAL_VALUES"];
$arParams["ADDITIONAL_VALUES"] = CUtil::JSEscape($arParams["ADDITIONAL_VALUES"]);
$arResult["TEXT"] = str_replace(array("<", ">"), array('&lt;', '&gt;'), $arParams["~TEXT"]);