mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	* Security fix: unauthorized access Affects nginx users: Moved php files outside of public html directory (Apache was protected by .htaccess) Affects all users: Some files did not check for authentication and could disclose some info. Better checks before including files from user input * git mv html/includes/ includes/html git mv html/pages/ includes/html/
		
			
				
	
	
		
			39 lines
		
	
	
		
			825 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			825 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
unset($datas);
 | 
						|
$datas[] = 'list';
 | 
						|
$datas[] = 'map';
 | 
						|
 | 
						|
$page_text['list'] = 'List';
 | 
						|
$page_text['map']  = 'Map';
 | 
						|
 | 
						|
$link_array = array(
 | 
						|
    'page' => 'device',
 | 
						|
    'device' => $device['device_id'],
 | 
						|
    'tab' => 'neighbours'
 | 
						|
);
 | 
						|
 | 
						|
print_optionbar_start();
 | 
						|
echo "<span style='font-weight: bold;'>Neighbours</span> » ";
 | 
						|
 | 
						|
$selection = basename($vars['selection'] ?? 'list');
 | 
						|
 | 
						|
unset($sep);
 | 
						|
foreach ($datas as $type) {
 | 
						|
    echo $sep;
 | 
						|
    
 | 
						|
    if ($selection == $type) {
 | 
						|
        echo '<span class="pagemenu-selected">';
 | 
						|
    }
 | 
						|
    echo generate_link($page_text[$type], $link_array, array(
 | 
						|
        'selection' => $type
 | 
						|
    ));
 | 
						|
    if ($selection == $type) {
 | 
						|
        echo '</span>';
 | 
						|
    }
 | 
						|
    $sep = ' | ';
 | 
						|
}
 | 
						|
print_optionbar_end();
 | 
						|
include "includes/html/pages/device/neighbours/$selection.inc.php";
 | 
						|
$pagetitle[] = 'Neighbours';
 |