block local directory for public access

This commit is contained in:
rabuzarus 2015-05-28 19:54:23 +02:00
parent b3992e1c65
commit a2a8afa583
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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;
}