Example #1
0
 public static function SetActive($bActive = false)
 {
     if ($bActive) {
         if (!CSecurityFrame::IsActive()) {
             RegisterModuleDependences("main", "OnPageStart", "security", "CSecurityFrame", "SetHeader", "0");
         }
     } else {
         if (CSecurityFrame::IsActive()) {
             UnRegisterModuleDependences("main", "OnPageStart", "security", "CSecurityFrame", "SetHeader");
         }
     }
 }
Example #2
0
$reporting_level = COption::GetOptionInt("main", "error_reporting", E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE);
if ($reporting_level == (E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE)) {
    $error_level = GetMessage("SEC_PANEL_ERROR1");
} elseif ($reporting_level == (E_ALL ^ E_NOTICE)) {
    $error_level = GetMessage("SEC_PANEL_ERROR2");
} elseif ($reporting_level == 0) {
    $error_level = GetMessage("SEC_PANEL_ERROR3");
} else {
    $error_level = GetMessage("SEC_PANEL_ERROR4");
}
$data['std']['ITEMS'][] = array("IS_OK" => $error_level == GetMessage("SEC_PANEL_ERROR1") || $error_level == GetMessage("SEC_PANEL_ERROR3"), "KPI_NAME" => GetMessage("SEC_PANEL_ERROR_NAME"), "KPI_VALUE" => $error_level, "KPI_RECOMMENDATION" => $error_level == GetMessage("SEC_PANEL_ERROR1") || $error_level == GetMessage("SEC_PANEL_ERROR3") ? '&nbsp;' : ($USER->CanDoOperation('edit_other_settings') ? '<a href="settings.php?lang=' . LANGUAGE_ID . '&amp;mid=main&amp;back_url_settings=' . urlencode('security_panel.php?lang=' . LANGUAGE_ID) . '">' . GetMessage("SEC_PANEL_ERROR1") . '</a>' : GetMessage("SEC_PANEL_ERROR1")));
global $DB;
$data['std']['ITEMS'][] = array("IS_OK" => !$DB->debug, "KPI_NAME" => GetMessage("SEC_PANEL_QUERY_DEBUG"), "KPI_VALUE" => $DB->debug ? GetMessage("SEC_PANEL_QUERY_DEBUG_VALUE_ON") : GetMessage("SEC_PANEL_QUERY_DEBUG_VALUE_OFF"), "KPI_RECOMMENDATION" => !$DB->debug ? '&nbsp;' : (IsModuleInstalled('fileman') && ($USER->CanDoOperation('fileman_admin_files') || $USER->CanDoOperation('fileman_edit_existent_files')) ? GetMessage("SEC_PANEL_QUERY_DEBUG_RECOMMENDATION_WITH_HREF", array("#HREF#" => '/bitrix/admin/fileman_file_edit.php?lang=' . LANGUAGE_ID . '&amp;full_src=Y&amp;path=' . urlencode(BX_PERSONAL_ROOT . '/php_interface/dbconn.php') . '&amp;back_url=' . urlencode('/bitrix/admin/security_panel.php?lang=' . LANGUAGE_ID))) : GetMessage("SEC_PANEL_QUERY_DEBUG_RECOMMENDATION_WO_HREF")));
$bEventLog = COption::GetOptionString("main", "event_log_logout", "N") === "Y" && COption::GetOptionString("main", "event_log_login_success", "N") === "Y" && COption::GetOptionString("main", "event_log_login_fail", "N") === "Y" && COption::GetOptionString("main", "event_log_register", "N") === "Y" && COption::GetOptionString("main", "event_log_register_fail", "N") === "Y" && COption::GetOptionString("main", "event_log_password_request", "N") === "Y" && COption::GetOptionString("main", "event_log_password_change", "N") === "Y" && COption::GetOptionString("main", "event_log_user_delete", "N") === "Y" && COption::GetOptionString("main", "event_log_user_groups", "N") === "Y" && COption::GetOptionString("main", "event_log_group_policy", "N") === "Y" && COption::GetOptionString("main", "event_log_module_access", "N") === "Y" && COption::GetOptionString("main", "event_log_file_access", "N") === "Y" && COption::GetOptionString("main", "event_log_task", "N") === "Y";
$data['high']['ITEMS'][] = array("IS_OK" => $bEventLog, "KPI_NAME" => GetMessage("SEC_PANEL_EVENT_LOG_NAME"), "KPI_VALUE" => $bEventLog ? GetMessage("SEC_PANEL_EVENT_LOG_VALUE_ON") : GetMessage("SEC_PANEL_EVENT_LOG_VALUE_OFF"), "KPI_RECOMMENDATION" => $bEventLog ? '&nbsp;' : ($USER->CanDoOperation('edit_other_settings') ? '<a href="settings.php?lang=' . LANGUAGE_ID . '&amp;mid=main&amp;back_url_settings=' . urlencode('security_panel.php?lang=' . LANGUAGE_ID) . '&amp;tabControl_active_tab=edit8">' . GetMessage("SEC_PANEL_EVENT_LOG_RECOMMENDATION") . '</a>' : GetMessage("SEC_PANEL_EVENT_LOG_RECOMMENDATION")));
$bSecurityFrame = CSecurityFrame::IsActive();
$data['high']['ITEMS'][] = array("IS_OK" => $bSecurityFrame, "KPI_NAME" => GetMessage("SEC_PANEL_FRAME_NAME"), "KPI_VALUE" => $bSecurityFrame ? GetMessage("SEC_PANEL_FRAME_VALUE_ON") : GetMessage("SEC_PANEL_FRAME_VALUE_OFF"), "KPI_RECOMMENDATION" => $bSecurityFrame ? '&nbsp;' : ($USER->CanDoOperation('security_frame_settings_write') ? '<a href="security_frame.php?lang=' . LANGUAGE_ID . '&amp;return_url=' . urlencode('security_panel.php?lang=' . LANGUAGE_ID) . '">' . GetMessage("SEC_PANEL_FRAME_RECOMMENDATION") . '</a>' : GetMessage("SEC_PANEL_FRAME_RECOMMENDATION")));
$rsIPRule = CSecurityIPRule::GetList(array(), array("=RULE_TYPE" => "A", "=ADMIN_SECTION" => "Y", "=SITE_ID" => false, "=SORT" => 10, "=ACTIVE_FROM" => false, "=ACTIVE_TO" => false), array("ID" => "ASC"));
$arIPRule = $rsIPRule->Fetch();
if ($arIPRule) {
    $bIPProtection = $arIPRule["ACTIVE"] == "Y";
} else {
    $bIPProtection = false;
}
$msgStopListDisabled = CSecurityIPRule::CheckAntiFile(true);
$data['high']['ITEMS'][] = array("IS_OK" => $bIPProtection && $msgStopListDisabled === false, "KPI_NAME" => GetMessage("SEC_PANEL_IPBLOCK_NAME"), "KPI_VALUE" => $bIPProtection && $msgStopListDisabled === false ? GetMessage("SEC_PANEL_IPBLOCK_VALUE_ON") : GetMessage("SEC_PANEL_IPBLOCK_VALUE_OFF"), "KPI_RECOMMENDATION" => $bIPProtection ? $msgStopListDisabled === false ? '&nbsp;' : $msgStopListDisabled->Show() : ($USER->CanDoOperation('security_iprule_admin_settings_write') ? '<a href="security_iprule_admin.php?lang=' . LANGUAGE_ID . '&amp;return_url=' . urlencode('security_panel.php?lang=' . LANGUAGE_ID) . '">' . GetMessage("SEC_PANEL_IPBLOCK_RECOMMENDATION") . '</a>' : GetMessage("SEC_PANEL_IPBLOCK_RECOMMENDATION")));
$bSessionsDB = COption::GetOptionString("security", "session") == "Y";
$data['high']['ITEMS'][] = array("IS_OK" => $bSessionsDB, "KPI_NAME" => GetMessage("SEC_PANEL_SESSDB_NAME"), "KPI_VALUE" => $bSessionsDB ? GetMessage("SEC_PANEL_SESSDB_VALUE_ON") : GetMessage("SEC_PANEL_SESSDB_VALUE_OFF"), "KPI_RECOMMENDATION" => $bSessionsDB ? '&nbsp;' : ($USER->CanDoOperation('security_session_settings_write') ? '<a href="security_session.php?lang=' . LANGUAGE_ID . '&amp;return_url=' . urlencode('security_panel.php?lang=' . LANGUAGE_ID) . '&amp;tabControl_active_tab=savedb">' . GetMessage("SEC_PANEL_SESSDB_RECOMMENDATION") . '</a>' : GetMessage("SEC_PANEL_SESSDB_RECOMMENDATION")));
$bSessionTTL = COption::GetOptionString("main", "use_session_id_ttl", "N") == "Y" && COption::GetOptionInt("main", "session_id_ttl", 0) > 0;
$data['high']['ITEMS'][] = array("IS_OK" => $bSessionTTL, "KPI_NAME" => GetMessage("SEC_PANEL_SESSID_NAME"), "KPI_VALUE" => $bSessionTTL ? GetMessage("SEC_PANEL_SESSID_VALUE_ON") : GetMessage("SEC_PANEL_SESSID_VALUE_OFF"), "KPI_RECOMMENDATION" => $bSessionTTL ? '&nbsp;' : ($USER->CanDoOperation('security_session_settings_write') ? '<a href="security_session.php?lang=' . LANGUAGE_ID . '&amp;return_url=' . urlencode('security_panel.php?lang=' . LANGUAGE_ID) . '&amp;tabControl_active_tab=sessid">' . GetMessage("SEC_PANEL_SESSID_RECOMMENDATION") . '</a>' : GetMessage("SEC_PANEL_SESSID_RECOMMENDATION")));
$bRedirect = CSecurityRedirect::IsActive();
Example #3
0
CAdminMessage::ShowMessage(array("MESSAGE" => $messageText, "TYPE" => $messageType, "DETAILS" => $messageDetails, "HTML" => true));
?>

<form method="POST" action="security_frame.php?lang=<?php 
echo LANGUAGE_ID;
echo $_GET["return_url"] ? "&amp;return_url=" . urlencode($_GET["return_url"]) : "";
?>
" enctype="multipart/form-data" name="editform">
<?php 
$tabControl->Begin();
$tabControl->BeginNextTab();
?>
<tr>
	<td colspan="2" align="left">
<?php 
if (CSecurityFrame::IsActive()) {
    ?>
		<input type="hidden" name="frame_active" value="N">
		<input type="submit" name="frame_siteb" value="<?php 
    echo GetMessage("SEC_FRAME_BUTTON_OFF");
    ?>
"<?php 
    if (!$canWrite) {
        echo " disabled";
    }
    ?>
>
<?php 
} else {
    ?>
		<input type="hidden" name="frame_active" value="Y">