ARGH!!!! note to self: ALWAYS use String.IsNullOrEmpty(...)!

this patch fixes RemoteAdminPlugin gratuitously updating the user
password even if no update was intended.
0.6.6-post-fixes
Dr Scofield 2009-06-09 12:11:22 +00:00
parent e9d0df02ce
commit 28324e5174
1 changed files with 2 additions and 1 deletions

View File

@ -1115,8 +1115,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (null == userProfile)
throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname));
if (null != passwd)
if (!String.IsNullOrEmpty(passwd))
{
m_log.DebugFormat("[RADMIN]: UpdateUserAccount: updating password for avatar {0} {1}", firstname, lastname);
string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(passwd) + ":" + String.Empty);
userProfile.PasswordHash = md5PasswdHash;
}