Esempio n. 1
0
function modsec_conf_add($tmp, $page, $msec_conf_id = '')
{
    if ('' != $msec_conf_id) {
        $conf = ModSecConfiguration::getModSecConfById($msec_conf_id);
        //print_r($conf);
    } else {
        $conf = new ModSecConfiguration();
    }
    $directive = Resource::getModSecurityDirectives();
    #print_r($argument_sperator = explode(",",$directive->getSecAuditLogType()));
    $tmp->assign(array('cid' => $conf->getId(), 'cname' => $conf->getName(), 'cdescription' => $conf->getDescription(), 'validity' => $conf->isActive(), 'SecArgumentSperator' => explode(",", $directive->getSecArgumentSperator()), 'arg_sperator' => $conf->getSecArgumentSperator(), 'SecAuditEngine' => explode(",", $directive->getSecAuditEngine()), 'audit_engine' => $conf->getSecAuditEngine(), 'audit_log' => $conf->getSecAuditLog(), 'alog_rstatus' => $conf->getSecAuditLogRelevantStatus(), 'alog_storegadir' => $conf->getSecAuditLogStorageDir(), 'chroot_dir' => $conf->getSecChrootDir(), 'SecContentInjection' => explode(",", $directive->getSecContentInjection()), 'content_injection' => $conf->getSecContentInjection(), 'SecCookieFormat' => explode(",", $directive->getSecCookieFormat()), 'cookie_format' => $conf->getSecCookieFormat(), 'data_dir' => $conf->getSecDataDir(), 'guardian_log' => $conf->getSecGuardianLog(), 'SecPdfProtect' => explode(",", $directive->getSecPdfProtect()), 'pdf_protect' => $conf->getSecPdfProtect(), 'SecPdfProtectMethod' => explode(",", $directive->getSecPdfProtectMethod()), 'pdf_protect_method' => $conf->getSecPdfProtectMethod(), 'SecPdfProtectTimeout' => explode(",", $directive->getSecPdfProtectTimeout()), 'pdf_protect_timeout' => $conf->getSecPdfProtectTimeout(), 'req_body_limit' => $conf->getSecRequestBodyLimit(), 'req_body_no_files_limit' => $conf->getSecRequestBodyNoFilesLimit(), 'req_body_in_memo_limit' => $conf->getSecRequestBodyInMemoryLimit(), 'resp_body_limit' => $conf->getSecResponseBodyLimit(), 'SecResponseBodyLimitAction' => explode(",", $directive->getSecResponseBodyLimitAction()), 'resp_body_limit_action' => $conf->getSecResponseBodyLimitAction(), 'SecResponseBodyMimeType' => explode(",", $directive->getSecResponseBodyMimeType()), 'resp_body_mime_type' => explode(",", $conf->getSecResponseBodyMimeType()), 'SecRuleInheritance' => explode(",", $directive->getSecRuleInheritance()), 'rule_inheritance' => $conf->getSecRuleInheritance(), 'SecRuleEngine' => explode(",", $directive->getSecRuleEngine()), 'rule_engine' => $conf->getSecRuleEngine(), 'tmp_dir' => $conf->getSecTmpDir(), 'web_app_id' => $conf->getSecWebAppId()));
    $tmp->assign('tab_page', $page);
}