Skip to content

Commit 7955e5a

Browse files
shin-mallangeleftherias
authored andcommitted
Polish UsernamePasswordAuthenticationFilter method
Closes gh-10970
1 parent cf29bf9 commit 7955e5a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

web/src/main/java/org/springframework/security/web/authentication/UsernamePasswordAuthenticationFilter.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ public Authentication attemptAuthentication(HttpServletRequest request, HttpServ
7575
throw new AuthenticationServiceException("Authentication method not supported: " + request.getMethod());
7676
}
7777
String username = obtainUsername(request);
78-
username = (username != null) ? username : "";
79-
username = username.trim();
78+
username = (username != null) ? username.trim() : "";
8079
String password = obtainPassword(request);
8180
password = (password != null) ? password : "";
8281
UsernamePasswordAuthenticationToken authRequest = UsernamePasswordAuthenticationToken.unauthenticated(username,

0 commit comments

Comments
 (0)