mirror of https://github.com/portainer/portainer
				
				
				
			fix(settings): fix crash during settings update when not using oauth [EE-7031] (#11661)
							parent
							
								
									8ae64523b3
								
							
						
					
					
						commit
						4403503d82
					
				| 
						 | 
				
			
			@ -96,8 +96,10 @@ func (payload *settingsUpdatePayload) Validate(r *http.Request) error {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if payload.OAuthSettings.AuthStyle < oauth2.AuthStyleAutoDetect || payload.OAuthSettings.AuthStyle > oauth2.AuthStyleInHeader {
 | 
			
		||||
		return errors.New("Invalid OAuth AuthStyle")
 | 
			
		||||
	if payload.OAuthSettings != nil {
 | 
			
		||||
		if payload.OAuthSettings.AuthStyle < oauth2.AuthStyleAutoDetect || payload.OAuthSettings.AuthStyle > oauth2.AuthStyleInHeader {
 | 
			
		||||
			return errors.New("Invalid OAuth AuthStyle")
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue