mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-31 06:38:42 +00:00 
			
		
		
		
	Handle usernames that are empty Strings.
This commit is contained in:
		
							parent
							
								
									ab6df6cfce
								
							
						
					
					
						commit
						1b660d4d5b
					
				| @ -226,8 +226,9 @@ public class DaoAuthenticationProvider implements AuthenticationProvider, | ||||
|                 if (this.context != null) { | ||||
|                     context.publishEvent(new AuthenticationFailureUsernameNotFoundEvent( | ||||
|                             authentication, | ||||
|                             new User(username, "*****", false, | ||||
|                                 new GrantedAuthority[0]))); | ||||
|                             new User("".equals(username) | ||||
|                                 ? "EMPTY_STRING_PROVIDED" : username, "*****", | ||||
|                                 false, new GrantedAuthority[0]))); | ||||
|                 } | ||||
| 
 | ||||
|                 throw ex; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user