mirror of
https://github.com/friendica/friendica
synced 2024-12-23 11:20:15 +00:00
Merge pull request #1619 from rabuzarus/block-local-dir
block local directory for public access
This commit is contained in:
commit
a36014fb0f
3 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue