mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	fix: Stop displaying sensitive info in the settings page (#4724)
fix: Stop displaying sensitive info in the settings page
This commit is contained in:
		
				
					committed by
					
						
						Søren Rosiak
					
				
			
			
				
	
			
			
			
						parent
						
							856ad3041b
						
					
				
				
					commit
					c71035bf1f
				
			@@ -80,12 +80,22 @@ if (is_admin() === true) {
 | 
			
		||||
 | 
			
		||||
        function a2t($a)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            $excluded = array(
 | 
			
		||||
                'db_pass',
 | 
			
		||||
                'email_smtp_password',
 | 
			
		||||
                'password',
 | 
			
		||||
                'auth_ad_bindpassword',
 | 
			
		||||
            );
 | 
			
		||||
 | 
			
		||||
            $r = '<table class="table table-condensed table-hover"><tbody>';
 | 
			
		||||
            foreach ($a as $k => $v) {
 | 
			
		||||
                if (!empty($v)) {
 | 
			
		||||
                    $r .= '<tr><td class="col-md-2"><i><b>' . $k . '</b></i></td><td class="col-md-10">';
 | 
			
		||||
                    $r .= is_array($v) ? a2t($v) : '<code>' . wordwrap($v, 75, '<br/>') . '</code>';
 | 
			
		||||
                    $r .= '</td></tr>';
 | 
			
		||||
                    if (!in_array($k, $excluded)) {
 | 
			
		||||
                        $r .= '<tr><td class="col-md-2"><i><b>' . $k . '</b></i></td><td class="col-md-10">';
 | 
			
		||||
                        $r .= is_array($v) ? a2t($v) : '<code>' . wordwrap($v, 75, '<br/>') . '</code>';
 | 
			
		||||
                        $r .= '</td></tr>';
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            $r .= '</tbody></table>';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user