]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #1644 from fabrixxm/issue-1514
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 2 Jun 2015 17:38:03 +0000 (19:38 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 2 Jun 2015 17:38:03 +0000 (19:38 +0200)
mask '#' in `[url]` url

htconfig.php
mod/directory.php
mod/poco.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..b13e17627a8dd6fd347d6e46a23b54efc3d902ca 100644 (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;
        }
index 86b43d651dc916e9ac6c19920a3b993a4e394c4e..89f2f879a05c1763b30358e62591fe0a935b614a 100644 (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);