block local directory for public access
This commit is contained in:
		
					parent
					
						
							
								b3992e1c65
							
						
					
				
			
			
				commit
				
					
						a2a8afa583
					
				
			
		
					 2 changed files with 5 additions and 1 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,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;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue