diff --git a/htconfig.php b/htconfig.php index 4208924cf..4c88b6e74 100644 --- a/htconfig.php +++ b/htconfig.php @@ -94,3 +94,7 @@ $a->config['system']['lockpath'] = ""; // Use the old style "share" // $a->config['system']['old_share'] = false; + +//Deny public access to the local directory +//$a->config['system']['block_local_dir'] = false; + diff --git a/mod/directory.php b/mod/directory.php index 7fab53b68..81f3c52c7 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -29,7 +29,7 @@ function directory_content(&$a) { require_once("mod/proxy.php"); - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + if((get_config('system','block_public')) && (! local_user()) && (! remote_user()) || (get_config('system','block_local_dir'))) { notice( t('Public access denied.') . EOL); return; }