Strip {MD5} as well as {SHA} from digested passwords
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@790405
13f79535-47bb-0310-9956-
ffa450edef68
boolean validated = false;
if (hasMessageDigest()) {
- // iPlanet support if the values starts with {SHA1}
+ // Some directories prefix the password with the hash type
// The string is in a format compatible with Base64.encode not
// the Hex encoding of the parent class.
- if (password.startsWith("{SHA}")) {
+ if (password.startsWith("{MD5}") || password.startsWith("{SHA}")) {
/* sync since super.digest() does this same thing */
synchronized (this) {
password = password.substring(5);