コード例 #1
0
ファイル: event.php プロジェクト: spas-viktor/books
 /**
  * @param string $severity
  * @param string $auditType
  * @param string $itemName
  * @param string $itemDescription
  * @return bool
  */
 public function doLog($severity, $auditType, $itemName, $itemDescription)
 {
     $savedInDB = $savedInFile = $savedInSyslog = false;
     if ($this->isDBEngineActive) {
         $savedInDB = CEventLog::log($severity, $auditType, "security", $itemName, base64_encode($itemDescription));
     }
     $message = "";
     if ($this->isSyslogEngineActive) {
         $message = $this->messageFormatter->format($auditType, $itemName, $itemDescription);
         $savedInSyslog = syslog($this->syslogPriority, $message);
     }
     if ($this->isFileEngineActive) {
         if (!$message) {
             $message = $this->messageFormatter->format($auditType, $itemName, $itemDescription);
         }
         $message .= "\n";
         $savedInFile = file_put_contents($this->filePath, $message, FILE_APPEND) > 0;
     }
     return $savedInDB || $savedInSyslog || $savedInFile;
 }
コード例 #2
0
ファイル: options.php プロジェクト: mrdeadmouse/u136006
        if ($_REQUEST["back_url_settings"] != "") {
            if ($_REQUEST["Update"] != "") {
                LocalRedirect($_REQUEST["back_url_settings"]);
            }
            $returnUrl = $_GET["return_url"] ? urlencode($_GET["return_url"]) : "";
            LocalRedirect($APPLICATION->GetCurPage() . "?mid=" . urlencode($module_id) . "&lang=" . urlencode(LANGUAGE_ID) . "&back_url_settings=" . $returnUrl . "&" . $tabControl->ActiveTabParam());
        } else {
            LocalRedirect($APPLICATION->GetCurPage() . "?mid=" . urlencode($module_id) . "&lang=" . urlencode(LANGUAGE_ID) . "&" . $tabControl->ActiveTabParam());
        }
    }
    $message = CSecurityIPRule::CheckAntiFile(true);
    if ($message) {
        echo $message->Show();
    }
    $availableMessagePlaceholders = CSecurityEventMessageFormatter::getAvailableMessagePlaceholders();
    $availableUserInfoPlaceholders = CSecurityEventMessageFormatter::getAvailableUserInfoPlaceholders();
    ?>
<form method="post" action="<?php 
    echo $APPLICATION->GetCurPage();
    ?>
?mid=<?php 
    echo urlencode($module_id);
    ?>
&amp;lang=<?php 
    echo LANGUAGE_ID;
    ?>
">
<?php 
    $tabControl->Begin();
    $tabControl->BeginNextTab();
    foreach ($arAllOptions as $arOption) {
コード例 #3
0
ファイル: default_option.php プロジェクト: spas-viktor/books
<?php

$security_default_option = array("ipcheck_allow_self_block" => "N", "ipcheck_disable_file" => "", "filter_action" => "filter", "filter_stop" => "N", "filter_duration" => 30, "filter_log" => "Y", "session" => "N", "hotp_user_window" => 10, "redirect_log" => "Y", "redirect_referer_check" => "Y", "redirect_href_sign" => "Y", "redirect_action" => "show_message", "redirect_message_warning" => "", "redirect_message_timeout" => 30, "redirect_url" => "/", "checker_region_kernel" => "Y", "checker_region_root" => "Y", "checker_region_personal_root" => "Y", "checker_region_public" => "Y", "checker_exts" => "php,js,htaccess", "checker_time" => 30, "antivirus_timeout" => 10, "antivirus_action" => "notify_only", "security_event_db_active" => "Y", "security_event_format" => CSecurityEventMessageFormatter::getDefaultMessageFormat(), "security_event_userinfo_format" => CSecurityEventMessageFormatter::getDefaultUserInfoFormat(), "security_event_syslog_active" => "N", "security_event_syslog_facility" => LOG_SYSLOG, "security_event_syslog_priority" => LOG_WARNING, "security_event_file_active" => "N", "security_event_file_path" => "", "needed_tests_packages" => "a:3:{i:0;s:10:\"slow_local\";i:1;s:10:\"fast_local\";i:2;s:6:\"remote\";}");