1
0
mirror of synced 2026-08-05 09:47:05 +00:00

SEC-549: Trim whitespace from username submitted with login form.

This commit is contained in:
Luke Taylor
2007-09-14 14:25:21 +00:00
parent 8398e940cf
commit 56deb3dd83
2 changed files with 18 additions and 3 deletions
@@ -68,6 +68,8 @@ public class AuthenticationProcessingFilter extends AbstractProcessingFilter {
password = "";
}
username = username.trim();
UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(username, password);
// Place the last username attempted into HttpSession for views
@@ -145,7 +147,7 @@ public class AuthenticationProcessingFilter extends AbstractProcessingFilter {
* @param passwordParameter the parameter name. Defaults to "j_password".
*/
public void setPasswordParameter(String passwordParameter) {
Assert.hasText(passwordParameter, "Password parameter must not be empty or null");
Assert.hasText(passwordParameter, "Password parameter must not be empty or null");
this.passwordParameter = passwordParameter;
}
}