function modsec_conf_insert($post, $db) { $conf = new ModSecConfiguration(); $conf->setName($post['cname']); $conf->setDescription($post['cdescription']); $conf->setActive($post['validity']); $conf->setSecArgumentSperator($post['SecArgumentSperator']); $conf->setSecAuditEngine($post['SecAuditEngine']); //$conf->setSecAuditLogParts($post['SecAuditLogParts']); $conf->setSecAuditLog($post['audit_log']); //$conf->setSecAuditLog2($post['audit_log2']); $conf->setSecAuditLogRelevantStatus($post['alog_rstatus']); $conf->setSecAuditLogStorageDir($post['alog_storegadir']); //$conf->setSecAuditLogType($post['SecAuditLogType']); //$conf->setSecCacheTransformations($post['SecCacheTransformations']); $conf->setSecChrootDir($post['chroot_dir']); //$conf->setSecComponentSignature($post['comp_signature']); $conf->setSecContentInjection($post['SecContentInjection']); $conf->setSecCookieFormat($post['SecCookieFormat']); $conf->setSecDataDir($post['data_dir']); //$conf->setSecDebugLog($post['debug_log']); //$conf->setSecDebugLogLevel($post['SecDebugLogLevel']); $conf->setSecGuardianLog($post['guardian_log']); $conf->setSecPdfProtect($post['SecPdfProtect']); $conf->setSecPdfProtectMethod($post['SecPdfProtectMethod']); $conf->setSecPdfProtectTimeout($post['SecPdfProtectTimeout']); //$conf->setSecRequestBodyAccess($post['SecRequestBodyAccess']); $conf->setSecRequestBodyLimit($post['req_body_limit']); $conf->setSecRequestBodyNoFilesLimit($post['req_body_no_files_limit']); $conf->setSecRequestBodyInMemoryLimit($post['req_body_in_memo_limit']); $conf->setSecResponseBodyLimit($post['resp_body_limit']); $conf->setSecResponseBodyLimitAction($post['SecResponseBodyLimitAction']); $conf->setSecResponseBodyMimeType(implode(',', $post['SecResponseBodyMimeType'])); //$conf->setSecResponseBodyAccess($post['SecResponseBodyAccess']); $conf->setSecRuleInheritance($post['SecRuleInheritance']); $conf->setSecRuleEngine($post['SecRuleEngine']); $conf->setSecTmpDir($post['tmp_dir']); //$conf->setSecUploadDir($post['upload_dir']); //$conf->setSecUploadKeepFiles($post['SecUploadKeepFiles']); $conf->setSecWebAppId($post['web_app_id']); $conf->setFilled(true); $db->addModSecConfiguration($conf); }