Make cleartext authentication case sensitive. Thanks jhurliman for spotting this.

0.6.6-post-fixes
Dahlia Trimble 2009-06-27 07:49:10 +00:00
parent 2d173d7556
commit 147c9bcd45
5 changed files with 7 additions and 7 deletions

View File

@ -119,7 +119,7 @@ namespace OpenSim.Client.Linden
string s = Util.Md5Hash(password + ":" + profile.PasswordSalt);
bool loginresult = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCulture));
return loginresult;
}
}

View File

@ -540,8 +540,8 @@ namespace OpenSim.Client.MXP.PacketHandler
password = password.Remove(0, 3); //remove $1$
string s = Util.Md5Hash(password + ":" + userProfile.PasswordSalt);
return (userProfile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
|| userProfile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
}
|| userProfile.PasswordHash.Equals(password, StringComparison.InvariantCulture));
}
else
{
return true;

View File

@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Services
string s = Util.Md5Hash(password + ":" + profile.PasswordSalt);
bool loginresult = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCulture));
return loginresult;
}
}

View File

@ -769,8 +769,8 @@ namespace OpenSim.Framework.Communications.Services
//m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password);
passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCulture));
return passwordSuccess;
}

View File

@ -126,7 +126,7 @@ namespace OpenSim.Services.AuthenticationService
//m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password);
passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
|| profile.PasswordHash.Equals(password, StringComparison.InvariantCulture));
return passwordSuccess;
}