Browse Source
			
			
			Don't error if admin token is empty but disabled
			
			
				pull/866/head
			
			
		 
		
			
				
					
						
						Daniel García
					
					6 years ago
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: FC8A7D14C3CD543A
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
1 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/config.rs
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -405,7 +405,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if let Some(ref token) = cfg.admin_token { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if token.trim().is_empty() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if token.trim().is_empty() && !cfg.disable_admin_token { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            err!("`ADMIN_TOKEN` is enabled but has an empty value. To enable the admin page without token, use `DISABLE_ADMIN_TOKEN`") | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |