mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-362: Fix case where credential object is null.
This commit is contained in:
		
				
					committed by
					
						 Nick Couchman
						Nick Couchman
					
				
			
			
				
	
			
			
			
						parent
						
							1c4831dd51
						
					
				
				
					commit
					1c333106c0
				
			| @@ -109,9 +109,12 @@ public class AuthenticationProviderService { | ||||
|                 AttributePrincipal principal = ticketService.validateTicket(ticket); | ||||
|                 String username = principal.getName(); | ||||
|                 credentials.setUsername(username); | ||||
|                 String clearPass = decryptPassword(principal.getAttributes().get("credential").toString()); | ||||
|                 if (clearPass != null && !clearPass.isEmpty()) | ||||
|                     credentials.setPassword(clearPass); | ||||
|                 Object credObj = principal.getAttributes().get("credential"); | ||||
|                 if (credObj != null) { | ||||
|                     String clearPass = decryptPassword(credObj.toString()); | ||||
|                     if (clearPass != null && !clearPass.isEmpty()) | ||||
|                         credentials.setPassword(clearPass); | ||||
|                 } | ||||
|                 authenticatedUser.init(username, credentials); | ||||
|                 return authenticatedUser; | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user