Skip to content

Commit e6a07db

Browse files
author
kevin.w.wall
committed
Changed check that examines if password matches account name to use String.equalsIgnoresCase() rather than just String.equals().
1 parent 9049eb2 commit e6a07db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/owasp/esapi/reference/FileBasedAuthenticator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,9 @@ private void verifyPasswordIsNotAccountName(String accountName, String password)
660660
throw new AuthenticationCredentialsException("Invalid password", "Attempt to use null password");
661661
}
662662
//jtm - 11/3/2010 - fix for bug http://code.google.com/p/owasp-esapi-java/issues/detail?id=108
663-
if (accountName.equals(password)) {
663+
if (accountName.equalsIgnoreCase(password)) {
664664
//password can't be account name
665-
throw new AuthenticationCredentialsException("Invalid password", "Password matches account name");
665+
throw new AuthenticationCredentialsException("Invalid password", "Password matches account name, irrespective of case");
666666
}
667667
}
668668

0 commit comments

Comments
 (0)