aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/Local')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 2c92491..38f1970 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -103,12 +103,17 @@ namespace OpenSim.Region.Communications.Local
103 { 103 {
104 MainLog.Instance.Notice( 104 MainLog.Instance.Notice(
105 "LOGIN", "Authenticating " + profile.username + " " + profile.surname); 105 "LOGIN", "Authenticating " + profile.username + " " + profile.surname);
106
107 if (!password.StartsWith("$1$"))
108 password = "$1$" + Util.Md5Hash(password);
106 109
107 password = password.Remove(0, 3); //remove $1$ 110 password = password.Remove(0, 3); //remove $1$
108 111
109 string s = Util.Md5Hash(password + ":" + profile.passwordSalt); 112 string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
110 113
111 return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); 114 bool loginresult = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
115 || profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
116 return loginresult;
112 } 117 }
113 } 118 }
114 119