1
0
Fork 0

Merge pull request #1619 from rabuzarus/block-local-dir

block local directory for public access
This commit is contained in:
fabrixxm 2015-06-02 17:53:19 +02:00
commit a36014fb0f
3 changed files with 7 additions and 2 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,8 @@ 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')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
return;
}

View file

@ -5,7 +5,7 @@ function poco_init(&$a) {
$system_mode = false;
if(intval(get_config('system','block_public')))
if(intval(get_config('system','block_public')) || (get_config('system','block_local_dir')))
http_status_exit(401);