From c6a81561dbec0849d630498e0e1eea47e0fd89cc Mon Sep 17 00:00:00 2001 From: marcelloc Date: Fri, 1 Feb 2013 23:23:53 -0200 Subject: dansguardian - include max upload size to group options and include empty ldap user group check --- config/dansguardian/dansguardian.inc | 13 +++---------- config/dansguardian/dansguardian_groups.xml | 14 +++++++++++++- config/dansguardian/dansguardian_ldap.php | 6 +++++- config/dansguardian/dansguardianfx.conf.template | 3 ++- 4 files changed, 23 insertions(+), 13 deletions(-) (limited to 'config') diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc index 5f06b75a..3077eddb 100755 --- a/config/dansguardian/dansguardian.inc +++ b/config/dansguardian/dansguardian.inc @@ -721,7 +721,7 @@ function sync_package_dansguardian($via_rpc=false,$install_process=false) { 'mode'=> "1", 'report_level'=>"global"); - $groups=array("scancleancache","hexdecodecontent","blockdownloads","enablepics","deepurlanalysis","infectionbypasserrorsonly","disablecontentscan"); + $groups=array("scancleancache","hexdecodecontent","blockdownloads","enablepics","deepurlanalysis","infectionbypasserrorsonly","disablecontentscan","sslcheckcert","sslmitm"); #loop on array $count=1; $user_xml=""; @@ -737,6 +737,7 @@ function sync_package_dansguardian($via_rpc=false,$install_process=false) { $dansguardian_groups['embeddedurlweight']=($dansguardian_groups['embeddedurlweight']?$dansguardian_groups['embeddedurlweight']:"0"); $dansguardian_groups['bypass']=($dansguardian_groups['bypass']?$dansguardian_groups['bypass']:"0"); $dansguardian_groups['infectionbypass']=($dansguardian_groups['infectionbypass']?$dansguardian_groups['infectionbypass']:"0"); + $dansguardian_groups['maxuploadsize']=($dansguardian_groups['maxuploadsize']?$dansguardian_groups['maxuploadsize']:$maxuploadsize); switch ($dansguardian_groups['reportinglevel']){ case "1": case "2": @@ -763,15 +764,7 @@ function sync_package_dansguardian($via_rpc=false,$install_process=false) { foreach ($groups as $group){ $dansguardian_groups[$group]=(preg_match("/$group/",$dansguardian_groups['group_options'])?"on":"off"); } - if (preg_match("/sslmitm/",$dansguardian_groups['group_options'])){ - $dansguardian_groups['mitmkey']="mitmkey = '".substr(md5(rand(100000000,999999999)),1,9)."'"; - $dansguardian_groups["sslmitm"]="on"; - $dansguardian_groups["sslcertcheck"]="on"; - } - else{ - $dansguardian_groups["sslmitm"]="off"; - $dansguardian_groups["sslcertcheck"]="off"; - } + #create group list files $lists=array("phraseacl" => array("bannedphrase","weightedphrase","exceptionphrase"), "siteacl" => array("bannedsite","greysite","exceptionsite","exceptionfilesite","logsite"), diff --git a/config/dansguardian/dansguardian_groups.xml b/config/dansguardian/dansguardian_groups.xml index 188b6d86..4fee3d50 100755 --- a/config/dansguardian/dansguardian_groups.xml +++ b/config/dansguardian/dansguardian_groups.xml @@ -150,6 +150,7 @@ + @@ -297,7 +298,7 @@ - Naughtiness limite + Naughtiness limit naughtynesslimit Phrases to do with good subjects will have negative values, and bad subjects will have positive values.
@@ -316,6 +317,17 @@ input 10
+ + Max upload size + maxuploadsize + input + 10 + + use 0 for a complete block
+ use higher (e.g. 512 = 512Kbytes) for limiting
+ use -1 for no blocking(default)
+ Leave empty to use global Max upload size limit value.]]>
+
Category display threshold categorydisplaythreshold diff --git a/config/dansguardian/dansguardian_ldap.php b/config/dansguardian/dansguardian_ldap.php index d44f3de4..beb57ee0 100644 --- a/config/dansguardian/dansguardian_ldap.php +++ b/config/dansguardian/dansguardian_ldap.php @@ -129,7 +129,11 @@ if (is_array($config['installedpackages']['dansguardiangroups']['config'])) } } } - if (!empty($members)){ + if (empty($members)){ + $config['installedpackages']['dansguardianusers']['config'][0][strtolower($group['name'])] = NULL; + $apply_config++; + } + else{ $import_users = explode("\n", $members); asort($import_users); $members=base64_encode(implode("\n", $import_users)); diff --git a/config/dansguardian/dansguardianfx.conf.template b/config/dansguardian/dansguardianfx.conf.template index 719c0c48..96b2b1b9 100644 --- a/config/dansguardian/dansguardianfx.conf.template +++ b/config/dansguardian/dansguardianfx.conf.template @@ -198,6 +198,7 @@ categorydisplaythreshold = {$dansguardian_groups['categorydisplaythreshold']} # WARNING: This option is highly CPU intensive! embeddedurlweight = {$dansguardian_groups['embeddedurlweight']} +maxuploadsize = {$dansguardian_groups['maxuploadsize']} # Enable PICS rating support # # Defaults to disabled @@ -370,7 +371,7 @@ deepurlanalysis = {$dansguardian_groups['deepurlanalysis']} #SSL certificate checking # Check that ssl certificates for servers on https connections are valid # and signed by a ca in the configured path -sslcertcheck = {$dansguardian_groups['sslcertcheck']} +sslcheckcert = {$dansguardian_groups['sslcheckcert']} #SSL man in the middle # Forge ssl certificates for all sites, decrypt the data then re encrypt it -- cgit v1.2.3