From 4565e5dfbccace2698b262c2b73a12b789c4853b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 26 Mar 2010 18:56:05 +0000 Subject: change trunk version to 0.7.Dev --- OpenSim/Framework/Servers/VersionInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index ec94b2d..90b5f57 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs @@ -29,7 +29,7 @@ namespace OpenSim { public class VersionInfo { - private const string VERSION_NUMBER = "0.6.9"; + private const string VERSION_NUMBER = "0.7"; private const Flavour VERSION_FLAVOUR = Flavour.Dev; public enum Flavour @@ -71,4 +71,4 @@ namespace OpenSim /// public readonly static int MajorInterfaceVersion = 6; } -} +} \ No newline at end of file -- cgit v1.1 From 5a2315c68c7ccac2fafeb7e2cd51ecda863a9fa7 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 26 Mar 2010 12:21:05 -0700 Subject: * Fixed a bug with null value handling in WebUtil.BuildQueryString() * Changed the null check back in estate manager setup but fixed the case for an existing account being found * Implemented SetPassword() in the SimianGrid auth connector --- OpenSim/Framework/WebUtil.cs | 8 +++- OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++- .../SimianAuthenticationServiceConnector.cs | 43 ++++++++++++++++++++-- 3 files changed, 50 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 16e44af..2843e20 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -263,8 +263,12 @@ namespace OpenSim.Framework foreach (string key in parameters.Keys) { - foreach (string value in parameters.GetValues(key)) - items.Add(String.Concat(key, "=", HttpUtility.UrlEncode(value ?? String.Empty))); + string[] values = parameters.GetValues(key); + if (values != null) + { + foreach (string value in values) + items.Add(String.Concat(key, "=", HttpUtility.UrlEncode(value ?? String.Empty))); + } } return String.Join("&", items.ToArray()); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7fed1ea..8a583c1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1266,8 +1266,9 @@ namespace OpenSim.Region.Framework.Scenes UserAccount account = UserAccountService.GetUserAccount(m_regInfo.ScopeID, first, last); - if (account != null) + if (account == null) { + // Create a new account account = new UserAccount(m_regInfo.ScopeID, first, last, String.Empty); if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0)) { @@ -1325,7 +1326,8 @@ namespace OpenSim.Region.Framework.Scenes } else { - MainConsole.Instance.Output("User account not found. Please enter the name of an existing user"); + m_regInfo.EstateSettings.EstateOwner = account.PrincipalID; + m_regInfo.EstateSettings.Save(); } } } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs index 29c9219..031b326 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs @@ -177,9 +177,46 @@ namespace OpenSim.Services.Connectors.SimianGrid public bool SetPassword(UUID principalID, string passwd) { - // TODO: Use GetIdentities to find the md5hash identity for principalID - // and then update it with AddIdentity - m_log.Error("[AUTH CONNECTOR]: Changing passwords is not implemented yet"); + // Fetch the user name first + NameValueCollection requestArgs = new NameValueCollection + { + { "RequestMethod", "GetUser" }, + { "UserID", principalID.ToString() } + }; + + OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); + if (response["Success"].AsBoolean() && response["User"] is OSDMap) + { + OSDMap userMap = (OSDMap)response["User"]; + string identifier = userMap["Name"].AsString(); + + if (!String.IsNullOrEmpty(identifier)) + { + // Add/update the md5hash identity + requestArgs = new NameValueCollection + { + { "RequestMethod", "AddIdentity" }, + { "Identifier", identifier }, + { "Credential", "$1$" + Utils.MD5String(passwd) }, + { "Type", "md5hash" }, + { "UserID", principalID.ToString() } + }; + + response = WebUtil.PostToService(m_serverUrl, requestArgs); + bool success = response["Success"].AsBoolean(); + + if (!success) + m_log.WarnFormat("[AUTH CONNECTOR]: Failed to set password for {0} ({1})", identifier, principalID); + + return success; + } + } + else + { + m_log.Warn("[AUTH CONNECTOR]: Failed to retrieve identities for " + principalID + ": " + + response["Message"].AsString()); + } + return false; } -- cgit v1.1 From 05123c6bd5442a7711660fcfb2eedd12c0b82efa Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 26 Mar 2010 12:39:22 -0700 Subject: * Fixed a dictionary value retrieval in GroupsModule --- OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index b011295..eb630de 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -1193,8 +1193,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups else { string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; - if (account.ServiceURLs["HomeURI"] != null) - domain = account.ServiceURLs["HomeURI"].ToString(); + object homeUriObj; + if (account.ServiceURLs.TryGetValue("HomeURI", out homeUriObj) && homeUriObj != null) + domain = homeUriObj.ToString(); // They're a local user, use this: info.RequestID.UserServiceURL = domain; } -- cgit v1.1