]> git.mxchange.org Git - friendica.git/commitdiff
block local directory for public access
authorrabuzarus <>
Thu, 28 May 2015 17:54:23 +0000 (19:54 +0200)
committerrabuzarus <>
Thu, 28 May 2015 17:54:23 +0000 (19:54 +0200)
htconfig.php
mod/directory.php

index 4208924cfd3f2d510288e16b8ca387d8776eb6e6..4c88b6e742dbc70fa8edf38a6af0c1016f2d5432 100644 (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;
+
index 7fab53b6807cadd363da70227b1f3c3a6679e5aa..81f3c52c7c0b9dcac731613972217b06d78dd760 100644 (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;
        }