From 147c9bcd453fde74c13a83a323a40ec0bb571c01 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Sat, 27 Jun 2009 07:49:10 +0000 Subject: Make cleartext authentication case sensitive. Thanks jhurliman for spotting this. --- OpenSim/Framework/Communications/Services/HGLoginAuthService.cs | 2 +- OpenSim/Framework/Communications/Services/LoginService.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Communications/Services') diff --git a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs index 3ab9b38..d3f813e 100644 --- a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs +++ b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs @@ -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; } } diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index 7eb98d7..897c763 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs @@ -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; } -- cgit v1.1