From a2a8afa58360cd655f1b60c3de3b369a03f9be80 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 28 May 2015 19:54:23 +0200 Subject: [PATCH] block local directory for public access --- htconfig.php | 4 ++++ mod/directory.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htconfig.php b/htconfig.php index 4208924cfd..4c88b6e742 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 7fab53b680..81f3c52c7c 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; } -- 2.39.5