From dbb16bf2db533d54d3be11a6a878909e237e3924 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 2 Jan 2010 09:54:46 -0800 Subject: * Forgotten ILibraryService from yesterday * New IAvatarService -- first pass --- OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index 7db705e..8d62423 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs @@ -36,6 +36,7 @@ using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Services.Interfaces; using IUserService = OpenSim.Framework.Communications.IUserService; +using IAvatarService = OpenSim.Framework.Communications.IAvatarService; namespace OpenSim.ApplicationPlugins.Rest.Inventory { -- cgit v1.1 From b63405c1a796b44b58081857d01f726372467628 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 8 Jan 2010 10:43:34 -0800 Subject: Inching ahead... This compiles, but very likely does not run. --- .../Rest/Inventory/RequestData.cs | 26 +- OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | 11 +- .../Rest/Inventory/RestAppearanceServices.cs | 347 +++++++++--------- .../Rest/Inventory/RestInventoryServices.cs | 396 +++++++++++---------- 4 files changed, 396 insertions(+), 384 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs index d3a7e64..10f1a6e 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs @@ -35,6 +35,9 @@ using System.Xml; using OpenSim.Framework; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; +using OpenSim.Services.Interfaces; + +using OpenMetaverse; namespace OpenSim.ApplicationPlugins.Rest.Inventory { @@ -658,7 +661,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory { int x; - string HA1; string first; string last; @@ -675,17 +677,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory last = String.Empty; } - UserProfileData udata = Rest.UserServices.GetUserProfile(first, last); + UserAccount account = Rest.UserServices.GetUserAccount(UUID.Zero, first, last); // If we don't recognize the user id, perhaps it is god? - - if (udata == null) + if (account == null) return pass == Rest.GodKey; - HA1 = HashToString(pass); - HA1 = HashToString(String.Format("{0}:{1}",HA1,udata.PasswordSalt)); - - return (0 == sc.Compare(HA1, udata.PasswordHash)); + return (Rest.AuthServices.Authenticate(account.PrincipalID, pass, 1) != string.Empty); } @@ -897,11 +895,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory last = String.Empty; } - UserProfileData udata = Rest.UserServices.GetUserProfile(first, last); - + UserAccount account = Rest.UserServices.GetUserAccount(UUID.Zero, first, last); // If we don;t recognize the user id, perhaps it is god? - if (udata == null) + if (account == null) { Rest.Log.DebugFormat("{0} Administrator", MsgId); return Rest.GodKey; @@ -909,7 +906,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory else { Rest.Log.DebugFormat("{0} Normal User {1}", MsgId, user); - return udata.PasswordHash; + + // !!! REFACTORING PROBLEM + // This is what it was. It doesn't work in 0.7 + // Nothing retrieves the password from the authentication service, there's only authentication. + //return udata.PasswordHash; + return string.Empty; } } diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index 8d62423..791cfcd 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs @@ -103,11 +103,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory get { return main.SceneManager.CurrentOrFirstScene.InventoryService; } } - internal static IUserService UserServices + internal static IUserAccountService UserServices { - get { return Comms.UserService; } + get { return main.SceneManager.CurrentOrFirstScene.UserAccountService; } } - + + internal static IAuthenticationService AuthServices + { + get { return main.SceneManager.CurrentOrFirstScene.AuthenticationService; } + } + internal static IAvatarService AvatarServices { get { return Comms.AvatarService; } diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index b2b4aa7..0a45eff 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs @@ -135,152 +135,153 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory private void DoAppearance(RequestData hdata) { - - AppearanceRequestData rdata = (AppearanceRequestData) hdata; - - Rest.Log.DebugFormat("{0} DoAppearance ENTRY", MsgId); - - // If we're disabled, do nothing. - - if (!enabled) - { - return; - } - - // Now that we know this is a serious attempt to - // access inventory data, we should find out who - // is asking, and make sure they are authorized - // to do so. We need to validate the caller's - // identity before revealing anything about the - // status quo. Authenticate throws an exception - // via Fail if no identity information is present. - // - // With the present HTTP server we can't use the - // builtin authentication mechanisms because they - // would be enforced for all in-bound requests. - // Instead we look at the headers ourselves and - // handle authentication directly. - - try - { - if (!rdata.IsAuthenticated) - { - rdata.Fail(Rest.HttpStatusCodeNotAuthorized,String.Format("user \"{0}\" could not be authenticated", rdata.userName)); - } - } - catch (RestException e) - { - if (e.statusCode == Rest.HttpStatusCodeNotAuthorized) - { - Rest.Log.WarnFormat("{0} User not authenticated", MsgId); - Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); - } - else - { - Rest.Log.ErrorFormat("{0} User authentication failed", MsgId); - Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); - } - throw (e); - } - - Rest.Log.DebugFormat("{0} Authenticated {1}", MsgId, rdata.userName); - - // We can only get here if we are authorized - // - // The requestor may have specified an UUID or - // a conjoined FirstName LastName string. We'll - // try both. If we fail with the first, UUID, - // attempt, we try the other. As an example, the - // URI for a valid inventory request might be: - // - // http://:/admin/inventory/Arthur Dent - // - // Indicating that this is an inventory request for - // an avatar named Arthur Dent. This is ALL that is - // required to designate a GET for an entire - // inventory. - // - - // Do we have at least a user agent name? - - if (rdata.Parameters.Length < 1) - { - Rest.Log.WarnFormat("{0} Appearance: No user agent identifier specified", MsgId); - rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified"); - } - - // The first parameter MUST be the agent identification, either an UUID - // or a space-separated First-name Last-Name specification. We check for - // an UUID first, if anyone names their character using a valid UUID - // that identifies another existing avatar will cause this a problem... - - try - { - rdata.uuid = new UUID(rdata.Parameters[PARM_USERID]); - Rest.Log.DebugFormat("{0} UUID supplied", MsgId); - rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid); - } - catch - { - string[] names = rdata.Parameters[PARM_USERID].Split(Rest.CA_SPACE); - if (names.Length == 2) - { - Rest.Log.DebugFormat("{0} Agent Name supplied [2]", MsgId); - rdata.userProfile = Rest.UserServices.GetUserProfile(names[0],names[1]); - } - else - { - Rest.Log.WarnFormat("{0} A Valid UUID or both first and last names must be specified", MsgId); - rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid user identity"); - } - } - - // If the user profile is null then either the server is broken, or the - // user is not known. We always assume the latter case. - - if (rdata.userProfile != null) - { - Rest.Log.DebugFormat("{0} User profile obtained for agent {1} {2}", - MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - } - else - { - Rest.Log.WarnFormat("{0} No user profile for {1}", MsgId, rdata.path); - rdata.Fail(Rest.HttpStatusCodeNotFound, "unrecognized user identity"); - } - - // If we get to here, then we have effectively validated the user's - - switch (rdata.method) - { - case Rest.HEAD : // Do the processing, set the status code, suppress entity - DoGet(rdata); - rdata.buffer = null; - break; - - case Rest.GET : // Do the processing, set the status code, return entity - DoGet(rdata); - break; - - case Rest.PUT : // Update named element - DoUpdate(rdata); - break; - - case Rest.POST : // Add new information to identified context. - DoExtend(rdata); - break; - - case Rest.DELETE : // Delete information - DoDelete(rdata); - break; - - default : - Rest.Log.WarnFormat("{0} Method {1} not supported for {2}", - MsgId, rdata.method, rdata.path); - rdata.Fail(Rest.HttpStatusCodeMethodNotAllowed, - String.Format("{0} not supported", rdata.method)); - break; - } + // !!! REFACTORIMG PROBLEM. This needs rewriting for 0.7 + + //AppearanceRequestData rdata = (AppearanceRequestData) hdata; + + //Rest.Log.DebugFormat("{0} DoAppearance ENTRY", MsgId); + + //// If we're disabled, do nothing. + + //if (!enabled) + //{ + // return; + //} + + //// Now that we know this is a serious attempt to + //// access inventory data, we should find out who + //// is asking, and make sure they are authorized + //// to do so. We need to validate the caller's + //// identity before revealing anything about the + //// status quo. Authenticate throws an exception + //// via Fail if no identity information is present. + //// + //// With the present HTTP server we can't use the + //// builtin authentication mechanisms because they + //// would be enforced for all in-bound requests. + //// Instead we look at the headers ourselves and + //// handle authentication directly. + + //try + //{ + // if (!rdata.IsAuthenticated) + // { + // rdata.Fail(Rest.HttpStatusCodeNotAuthorized,String.Format("user \"{0}\" could not be authenticated", rdata.userName)); + // } + //} + //catch (RestException e) + //{ + // if (e.statusCode == Rest.HttpStatusCodeNotAuthorized) + // { + // Rest.Log.WarnFormat("{0} User not authenticated", MsgId); + // Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); + // } + // else + // { + // Rest.Log.ErrorFormat("{0} User authentication failed", MsgId); + // Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); + // } + // throw (e); + //} + + //Rest.Log.DebugFormat("{0} Authenticated {1}", MsgId, rdata.userName); + + //// We can only get here if we are authorized + //// + //// The requestor may have specified an UUID or + //// a conjoined FirstName LastName string. We'll + //// try both. If we fail with the first, UUID, + //// attempt, we try the other. As an example, the + //// URI for a valid inventory request might be: + //// + //// http://:/admin/inventory/Arthur Dent + //// + //// Indicating that this is an inventory request for + //// an avatar named Arthur Dent. This is ALL that is + //// required to designate a GET for an entire + //// inventory. + //// + + //// Do we have at least a user agent name? + + //if (rdata.Parameters.Length < 1) + //{ + // Rest.Log.WarnFormat("{0} Appearance: No user agent identifier specified", MsgId); + // rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified"); + //} + + //// The first parameter MUST be the agent identification, either an UUID + //// or a space-separated First-name Last-Name specification. We check for + //// an UUID first, if anyone names their character using a valid UUID + //// that identifies another existing avatar will cause this a problem... + + //try + //{ + // rdata.uuid = new UUID(rdata.Parameters[PARM_USERID]); + // Rest.Log.DebugFormat("{0} UUID supplied", MsgId); + // rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid); + //} + //catch + //{ + // string[] names = rdata.Parameters[PARM_USERID].Split(Rest.CA_SPACE); + // if (names.Length == 2) + // { + // Rest.Log.DebugFormat("{0} Agent Name supplied [2]", MsgId); + // rdata.userProfile = Rest.UserServices.GetUserProfile(names[0],names[1]); + // } + // else + // { + // Rest.Log.WarnFormat("{0} A Valid UUID or both first and last names must be specified", MsgId); + // rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid user identity"); + // } + //} + + //// If the user profile is null then either the server is broken, or the + //// user is not known. We always assume the latter case. + + //if (rdata.userProfile != null) + //{ + // Rest.Log.DebugFormat("{0} User profile obtained for agent {1} {2}", + // MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); + //} + //else + //{ + // Rest.Log.WarnFormat("{0} No user profile for {1}", MsgId, rdata.path); + // rdata.Fail(Rest.HttpStatusCodeNotFound, "unrecognized user identity"); + //} + + //// If we get to here, then we have effectively validated the user's + + //switch (rdata.method) + //{ + // case Rest.HEAD : // Do the processing, set the status code, suppress entity + // DoGet(rdata); + // rdata.buffer = null; + // break; + + // case Rest.GET : // Do the processing, set the status code, return entity + // DoGet(rdata); + // break; + + // case Rest.PUT : // Update named element + // DoUpdate(rdata); + // break; + + // case Rest.POST : // Add new information to identified context. + // DoExtend(rdata); + // break; + + // case Rest.DELETE : // Delete information + // DoDelete(rdata); + // break; + + // default : + // Rest.Log.WarnFormat("{0} Method {1} not supported for {2}", + // MsgId, rdata.method, rdata.path); + // rdata.Fail(Rest.HttpStatusCodeMethodNotAllowed, + // String.Format("{0} not supported", rdata.method)); + // break; + //} } #endregion Interface @@ -391,37 +392,39 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory private void DoUpdate(AppearanceRequestData rdata) { - bool created = false; - bool modified = false; + // REFACTORING PROBLEM This was commented out. It doesn't work for 0.7 + //bool created = false; + //bool modified = false; - rdata.userAppearance = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID); - // If the user exists then this is considered a modification regardless - // of what may, or may not be, specified in the payload. + //rdata.userAppearance = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID); - if (rdata.userAppearance != null) - { - modified = true; - Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); - Rest.UserServices.UpdateUserProfile(rdata.userProfile); - } + //// If the user exists then this is considered a modification regardless + //// of what may, or may not be, specified in the payload. - if (created) - { - rdata.Complete(Rest.HttpStatusCodeCreated); - } - else - { - if (modified) - { - rdata.Complete(Rest.HttpStatusCodeOK); - } - else - { - rdata.Complete(Rest.HttpStatusCodeNoContent); - } - } + //if (rdata.userAppearance != null) + //{ + // modified = true; + // Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); + // Rest.UserServices.UpdateUserProfile(rdata.userProfile); + //} + + //if (created) + //{ + // rdata.Complete(Rest.HttpStatusCodeCreated); + //} + //else + //{ + // if (modified) + // { + // rdata.Complete(Rest.HttpStatusCodeOK); + // } + // else + // { + // rdata.Complete(Rest.HttpStatusCodeNoContent); + // } + //} rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method)); diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 01bfe00..098c54d 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -143,203 +143,205 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory Rest.Log.DebugFormat("{0} DoInventory ENTRY", MsgId); - // If we're disabled, do nothing. - - if (!enabled) - { - return; - } - - // Now that we know this is a serious attempt to - // access inventory data, we should find out who - // is asking, and make sure they are authorized - // to do so. We need to validate the caller's - // identity before revealing anything about the - // status quo. Authenticate throws an exception - // via Fail if no identity information is present. - // - // With the present HTTP server we can't use the - // builtin authentication mechanisms because they - // would be enforced for all in-bound requests. - // Instead we look at the headers ourselves and - // handle authentication directly. - - try - { - if (!rdata.IsAuthenticated) - { - rdata.Fail(Rest.HttpStatusCodeNotAuthorized,String.Format("user \"{0}\" could not be authenticated", rdata.userName)); - } - } - catch (RestException e) - { - if (e.statusCode == Rest.HttpStatusCodeNotAuthorized) - { - Rest.Log.WarnFormat("{0} User not authenticated", MsgId); - Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); - } - else - { - Rest.Log.ErrorFormat("{0} User authentication failed", MsgId); - Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); - } - throw (e); - } - - Rest.Log.DebugFormat("{0} Authenticated {1}", MsgId, rdata.userName); - - // We can only get here if we are authorized - // - // The requestor may have specified an UUID or - // a conjoined FirstName LastName string. We'll - // try both. If we fail with the first, UUID, - // attempt, we try the other. As an example, the - // URI for a valid inventory request might be: - // - // http://:/admin/inventory/Arthur Dent - // - // Indicating that this is an inventory request for - // an avatar named Arthur Dent. This is ALL that is - // required to designate a GET for an entire - // inventory. - // - - - // Do we have at least a user agent name? - - if (rdata.Parameters.Length < 1) - { - Rest.Log.WarnFormat("{0} Inventory: No user agent identifier specified", MsgId); - rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified"); - } - - // The first parameter MUST be the agent identification, either an UUID - // or a space-separated First-name Last-Name specification. We check for - // an UUID first, if anyone names their character using a valid UUID - // that identifies another existing avatar will cause this a problem... - - try - { - rdata.uuid = new UUID(rdata.Parameters[PARM_USERID]); - Rest.Log.DebugFormat("{0} UUID supplied", MsgId); - rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid); - } - catch - { - string[] names = rdata.Parameters[PARM_USERID].Split(Rest.CA_SPACE); - if (names.Length == 2) - { - Rest.Log.DebugFormat("{0} Agent Name supplied [2]", MsgId); - rdata.userProfile = Rest.UserServices.GetUserProfile(names[0],names[1]); - } - else - { - Rest.Log.WarnFormat("{0} A Valid UUID or both first and last names must be specified", MsgId); - rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid user identity"); - } - } - - // If the user profile is null then either the server is broken, or the - // user is not known. We always assume the latter case. - - if (rdata.userProfile != null) - { - Rest.Log.DebugFormat("{0} Profile obtained for agent {1} {2}", - MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - } - else - { - Rest.Log.WarnFormat("{0} No profile for {1}", MsgId, rdata.path); - rdata.Fail(Rest.HttpStatusCodeNotFound, "unrecognized user identity"); - } - - // If we get to here, then we have effectively validated the user's - // identity. Now we need to get the inventory. If the server does not - // have the inventory, we reject the request with an appropriate explanation. - // - // Note that inventory retrieval is an asynchronous event, we use the rdata - // class instance as the basis for our synchronization. - // - - rdata.uuid = rdata.userProfile.ID; - - if (Rest.InventoryServices.HasInventoryForUser(rdata.uuid)) - { - rdata.root = Rest.InventoryServices.GetRootFolder(rdata.uuid); - - Rest.Log.DebugFormat("{0} Inventory Root retrieved for {1} {2}", - MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - - Rest.InventoryServices.GetUserInventory(rdata.uuid, rdata.GetUserInventory); - - Rest.Log.DebugFormat("{0} Inventory catalog requested for {1} {2}", - MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - - lock (rdata) - { - if (!rdata.HaveInventory) - { - rdata.startWD(1000); - rdata.timeout = false; - Monitor.Wait(rdata); - } - } - - if (rdata.timeout) - { - Rest.Log.WarnFormat("{0} Inventory not available for {1} {2}. No response from service.", - MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - rdata.Fail(Rest.HttpStatusCodeServerError, "inventory server not responding"); - } - - if (rdata.root == null) - { - Rest.Log.WarnFormat("{0} Inventory is not available [1] for agent {1} {2}", - MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - rdata.Fail(Rest.HttpStatusCodeServerError, "inventory retrieval failed"); - } - - } - else - { - Rest.Log.WarnFormat("{0} Inventory is not locally available for agent {1} {2}", - MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - rdata.Fail(Rest.HttpStatusCodeNotFound, "no local inventory for user"); - } - - // If we get here, then we have successfully retrieved the user's information - // and inventory information is now available locally. - - switch (rdata.method) - { - case Rest.HEAD : // Do the processing, set the status code, suppress entity - DoGet(rdata); - rdata.buffer = null; - break; - - case Rest.GET : // Do the processing, set the status code, return entity - DoGet(rdata); - break; - - case Rest.PUT : // Update named element - DoUpdate(rdata); - break; - - case Rest.POST : // Add new information to identified context. - DoExtend(rdata); - break; - - case Rest.DELETE : // Delete information - DoDelete(rdata); - break; - - default : - Rest.Log.WarnFormat("{0} Method {1} not supported for {2}", - MsgId, rdata.method, rdata.path); - rdata.Fail(Rest.HttpStatusCodeMethodNotAllowed, - String.Format("{0} not supported", rdata.method)); - break; - } + // !!! REFACTORING PROBLEM + + //// If we're disabled, do nothing. + + //if (!enabled) + //{ + // return; + //} + + //// Now that we know this is a serious attempt to + //// access inventory data, we should find out who + //// is asking, and make sure they are authorized + //// to do so. We need to validate the caller's + //// identity before revealing anything about the + //// status quo. Authenticate throws an exception + //// via Fail if no identity information is present. + //// + //// With the present HTTP server we can't use the + //// builtin authentication mechanisms because they + //// would be enforced for all in-bound requests. + //// Instead we look at the headers ourselves and + //// handle authentication directly. + + //try + //{ + // if (!rdata.IsAuthenticated) + // { + // rdata.Fail(Rest.HttpStatusCodeNotAuthorized,String.Format("user \"{0}\" could not be authenticated", rdata.userName)); + // } + //} + //catch (RestException e) + //{ + // if (e.statusCode == Rest.HttpStatusCodeNotAuthorized) + // { + // Rest.Log.WarnFormat("{0} User not authenticated", MsgId); + // Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); + // } + // else + // { + // Rest.Log.ErrorFormat("{0} User authentication failed", MsgId); + // Rest.Log.DebugFormat("{0} Authorization header: {1}", MsgId, rdata.request.Headers.Get("Authorization")); + // } + // throw (e); + //} + + //Rest.Log.DebugFormat("{0} Authenticated {1}", MsgId, rdata.userName); + + //// We can only get here if we are authorized + //// + //// The requestor may have specified an UUID or + //// a conjoined FirstName LastName string. We'll + //// try both. If we fail with the first, UUID, + //// attempt, we try the other. As an example, the + //// URI for a valid inventory request might be: + //// + //// http://:/admin/inventory/Arthur Dent + //// + //// Indicating that this is an inventory request for + //// an avatar named Arthur Dent. This is ALL that is + //// required to designate a GET for an entire + //// inventory. + //// + + + //// Do we have at least a user agent name? + + //if (rdata.Parameters.Length < 1) + //{ + // Rest.Log.WarnFormat("{0} Inventory: No user agent identifier specified", MsgId); + // rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified"); + //} + + //// The first parameter MUST be the agent identification, either an UUID + //// or a space-separated First-name Last-Name specification. We check for + //// an UUID first, if anyone names their character using a valid UUID + //// that identifies another existing avatar will cause this a problem... + + //try + //{ + // rdata.uuid = new UUID(rdata.Parameters[PARM_USERID]); + // Rest.Log.DebugFormat("{0} UUID supplied", MsgId); + // rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid); + //} + //catch + //{ + // string[] names = rdata.Parameters[PARM_USERID].Split(Rest.CA_SPACE); + // if (names.Length == 2) + // { + // Rest.Log.DebugFormat("{0} Agent Name supplied [2]", MsgId); + // rdata.userProfile = Rest.UserServices.GetUserProfile(names[0],names[1]); + // } + // else + // { + // Rest.Log.WarnFormat("{0} A Valid UUID or both first and last names must be specified", MsgId); + // rdata.Fail(Rest.HttpStatusCodeBadRequest, "invalid user identity"); + // } + //} + + //// If the user profile is null then either the server is broken, or the + //// user is not known. We always assume the latter case. + + //if (rdata.userProfile != null) + //{ + // Rest.Log.DebugFormat("{0} Profile obtained for agent {1} {2}", + // MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); + //} + //else + //{ + // Rest.Log.WarnFormat("{0} No profile for {1}", MsgId, rdata.path); + // rdata.Fail(Rest.HttpStatusCodeNotFound, "unrecognized user identity"); + //} + + //// If we get to here, then we have effectively validated the user's + //// identity. Now we need to get the inventory. If the server does not + //// have the inventory, we reject the request with an appropriate explanation. + //// + //// Note that inventory retrieval is an asynchronous event, we use the rdata + //// class instance as the basis for our synchronization. + //// + + //rdata.uuid = rdata.userProfile.ID; + + //if (Rest.InventoryServices.HasInventoryForUser(rdata.uuid)) + //{ + // rdata.root = Rest.InventoryServices.GetRootFolder(rdata.uuid); + + // Rest.Log.DebugFormat("{0} Inventory Root retrieved for {1} {2}", + // MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); + + // Rest.InventoryServices.GetUserInventory(rdata.uuid, rdata.GetUserInventory); + + // Rest.Log.DebugFormat("{0} Inventory catalog requested for {1} {2}", + // MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); + + // lock (rdata) + // { + // if (!rdata.HaveInventory) + // { + // rdata.startWD(1000); + // rdata.timeout = false; + // Monitor.Wait(rdata); + // } + // } + + // if (rdata.timeout) + // { + // Rest.Log.WarnFormat("{0} Inventory not available for {1} {2}. No response from service.", + // MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); + // rdata.Fail(Rest.HttpStatusCodeServerError, "inventory server not responding"); + // } + + // if (rdata.root == null) + // { + // Rest.Log.WarnFormat("{0} Inventory is not available [1] for agent {1} {2}", + // MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); + // rdata.Fail(Rest.HttpStatusCodeServerError, "inventory retrieval failed"); + // } + + //} + //else + //{ + // Rest.Log.WarnFormat("{0} Inventory is not locally available for agent {1} {2}", + // MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); + // rdata.Fail(Rest.HttpStatusCodeNotFound, "no local inventory for user"); + //} + + //// If we get here, then we have successfully retrieved the user's information + //// and inventory information is now available locally. + + //switch (rdata.method) + //{ + // case Rest.HEAD : // Do the processing, set the status code, suppress entity + // DoGet(rdata); + // rdata.buffer = null; + // break; + + // case Rest.GET : // Do the processing, set the status code, return entity + // DoGet(rdata); + // break; + + // case Rest.PUT : // Update named element + // DoUpdate(rdata); + // break; + + // case Rest.POST : // Add new information to identified context. + // DoExtend(rdata); + // break; + + // case Rest.DELETE : // Delete information + // DoDelete(rdata); + // break; + + // default : + // Rest.Log.WarnFormat("{0} Method {1} not supported for {2}", + // MsgId, rdata.method, rdata.path); + // rdata.Fail(Rest.HttpStatusCodeMethodNotAllowed, + // String.Format("{0} not supported", rdata.method)); + // break; + //} } #endregion Interface -- cgit v1.1 From 3c90d834eac382af5edf091e83aea1ffcce91792 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Jan 2010 22:41:42 +0000 Subject: Remove all references to master avatar, replacing with estate owner where appropriate. This changes the behavior of the REST plugins and RemoteAdmin's region creation process. --- OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs | 8 -------- OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs | 9 +-------- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs index 5798286..734b668 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs @@ -113,14 +113,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions rxw.WriteString(s.RegionInfo.ExternalHostName); rxw.WriteEndAttribute(); - rxw.WriteStartAttribute(String.Empty, "master_name", String.Empty); - rxw.WriteString(String.Format("{0} {1}", s.RegionInfo.MasterAvatarFirstName, s.RegionInfo.MasterAvatarLastName)); - rxw.WriteEndAttribute(); - - rxw.WriteStartAttribute(String.Empty, "master_uuid", String.Empty); - rxw.WriteString(s.RegionInfo.MasterAvatarAssignedUUID.ToString()); - rxw.WriteEndAttribute(); - rxw.WriteStartAttribute(String.Empty, "ip", String.Empty); rxw.WriteString(s.RegionInfo.InternalEndPoint.ToString()); rxw.WriteEndAttribute(); diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs index 746d08d..5e76009 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs @@ -56,20 +56,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions region_id = regInfo.RegionID.ToString(); region_x = regInfo.RegionLocX; region_y = regInfo.RegionLocY; - if (regInfo.EstateSettings.EstateOwner != UUID.Zero) - region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); - else - region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString(); + region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); region_http_port = regInfo.HttpPort; region_server_uri = regInfo.ServerURI; region_external_hostname = regInfo.ExternalHostName; Uri uri = new Uri(region_server_uri); region_port = (uint)uri.Port; - - if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) - region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, - regInfo.MasterAvatarLastName); } public string this[string idx] -- cgit v1.1 From 4dd523b45d1e635c66eb4e556764fabe29dbfc58 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 15:34:56 -0800 Subject: * Changed IPresenceService Logout, so that it takes a position and a lookat * CommsManager.AvatarService rerouted --- OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | 9 ++------ .../Rest/Inventory/RestAppearanceServices.cs | 26 +++++++++++++--------- 2 files changed, 17 insertions(+), 18 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index 791cfcd..c40ea0e 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs @@ -36,7 +36,7 @@ using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Services.Interfaces; using IUserService = OpenSim.Framework.Communications.IUserService; -using IAvatarService = OpenSim.Framework.Communications.IAvatarService; +using IAvatarService = OpenSim.Services.Interfaces.IAvatarService; namespace OpenSim.ApplicationPlugins.Rest.Inventory { @@ -93,11 +93,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory /// initializes. /// - internal static CommunicationsManager Comms - { - get { return main.CommunicationsManager; } - } - internal static IInventoryService InventoryServices { get { return main.SceneManager.CurrentOrFirstScene.InventoryService; } @@ -115,7 +110,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory internal static IAvatarService AvatarServices { - get { return Comms.AvatarService; } + get { return main.SceneManager.CurrentOrFirstScene.AvatarService; } } internal static IAssetService AssetServices diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 0a45eff..5429890 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs @@ -32,6 +32,7 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; +using OpenSim.Services.Interfaces; namespace OpenSim.ApplicationPlugins.Rest.Inventory { @@ -295,15 +296,15 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory private void DoGet(AppearanceRequestData rdata) { + AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID); - rdata.userAppearance = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID); - - if (rdata.userAppearance == null) + if (adata == null) { rdata.Fail(Rest.HttpStatusCodeNoContent, String.Format("appearance data not found for user {0} {1}", rdata.userProfile.FirstName, rdata.userProfile.SurName)); } + rdata.userAppearance = adata.ToAvatarAppearance(); rdata.initXmlWriter(); @@ -342,18 +343,20 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // increasingly doubtful that it is appropriate for REST. If I attempt to // add a new record, and it already exists, then it seems to me that the // attempt should fail, rather than update the existing record. - + AvatarData adata = null; if (GetUserAppearance(rdata)) { modified = rdata.userAppearance != null; created = !modified; - Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); + adata = new AvatarData(rdata.userAppearance); + Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); // Rest.UserServices.UpdateUserProfile(rdata.userProfile); } else { created = true; - Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); + adata = new AvatarData(rdata.userAppearance); + Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); // Rest.UserServices.UpdateUserProfile(rdata.userProfile); } @@ -439,21 +442,22 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory private void DoDelete(AppearanceRequestData rdata) { + AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID); - AvatarAppearance old = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID); - - if (old != null) + if (adata != null) { + AvatarAppearance old = adata.ToAvatarAppearance(); rdata.userAppearance = new AvatarAppearance(); - rdata.userAppearance.Owner = old.Owner; + adata = new AvatarData(rdata.userAppearance); - Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); + Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); rdata.Complete(); } else { + rdata.Complete(Rest.HttpStatusCodeNoContent); } -- cgit v1.1 From cddd48aeeaee98d14fd4ae887cdf32abc6110c40 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 21:00:03 -0800 Subject: Some more unnecessary things deleted in Framework.Communications. --- OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index c40ea0e..9755e73 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs @@ -35,7 +35,6 @@ using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Services.Interfaces; -using IUserService = OpenSim.Framework.Communications.IUserService; using IAvatarService = OpenSim.Services.Interfaces.IAvatarService; namespace OpenSim.ApplicationPlugins.Rest.Inventory -- cgit v1.1 From c5ea783526611a968400a1936e4c6764ee1c7013 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 11 Jan 2010 07:51:33 -0800 Subject: OpenSim/Framework/Communications/Cache deleted. LibraryRootFolder deleted. --- OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 098c54d..fb1d739 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -36,7 +36,7 @@ using System.Xml; using OpenMetaverse; using OpenMetaverse.Imaging; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; + using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using Timer=System.Timers.Timer; -- cgit v1.1 From 77e43f480154b0a950d9d5f54df5c225fc64e77a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 11 Jan 2010 17:30:05 -0800 Subject: Fixed a couple of bugs with Appearance. Appearance is all good now. --- OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 5429890..b70a511 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs @@ -304,7 +304,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory String.Format("appearance data not found for user {0} {1}", rdata.userProfile.FirstName, rdata.userProfile.SurName)); } - rdata.userAppearance = adata.ToAvatarAppearance(); + rdata.userAppearance = adata.ToAvatarAppearance(rdata.userProfile.ID); rdata.initXmlWriter(); @@ -446,7 +446,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory if (adata != null) { - AvatarAppearance old = adata.ToAvatarAppearance(); + AvatarAppearance old = adata.ToAvatarAppearance(rdata.userProfile.ID); rdata.userAppearance = new AvatarAppearance(); rdata.userAppearance.Owner = old.Owner; adata = new AvatarData(rdata.userAppearance); -- cgit v1.1 From 7665aad002ef066fc31fa9497225d2668641c769 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 22 Feb 2010 13:27:17 -0800 Subject: * Adds CreatorID to asset metadata. This is just the plumbing to support CreatorID, it doesn't modify database backends or OAR files to support storing/loading it --- OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | 4 ++-- OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs index 66572d5..54ce80e 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs @@ -261,7 +261,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory modified = (asset != null); created = !modified; - asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type"))); + asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type")), UUID.Zero); asset.Description = xml.GetAttribute("desc"); asset.Local = Int32.Parse(xml.GetAttribute("local")) != 0; asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; @@ -338,7 +338,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory modified = (asset != null); created = !modified; - asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type"))); + asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type")), UUID.Zero); asset.Description = xml.GetAttribute("desc"); asset.Local = Int32.Parse(xml.GetAttribute("local")) != 0; asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index fb1d739..9ab2763 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -1871,7 +1871,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // Create AssetBase entity to hold the inlined asset - asset = new AssetBase(uuid, name, type); + asset = new AssetBase(uuid, name, type, UUID.Zero); asset.Description = desc; asset.Local = local; -- cgit v1.1 From df76e95aa2dc9f3f3a0c546761b7624adc183ed0 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 22 Feb 2010 14:18:59 -0800 Subject: Changed asset CreatorID to a string --- OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | 4 ++-- OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs index 54ce80e..4ba3d77 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs @@ -261,7 +261,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory modified = (asset != null); created = !modified; - asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type")), UUID.Zero); + asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type")), UUID.Zero.ToString()); asset.Description = xml.GetAttribute("desc"); asset.Local = Int32.Parse(xml.GetAttribute("local")) != 0; asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; @@ -338,7 +338,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory modified = (asset != null); created = !modified; - asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type")), UUID.Zero); + asset = new AssetBase(uuid, xml.GetAttribute("name"), SByte.Parse(xml.GetAttribute("type")), UUID.Zero.ToString()); asset.Description = xml.GetAttribute("desc"); asset.Local = Int32.Parse(xml.GetAttribute("local")) != 0; asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 9ab2763..10f387d 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -1871,7 +1871,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // Create AssetBase entity to hold the inlined asset - asset = new AssetBase(uuid, name, type, UUID.Zero); + asset = new AssetBase(uuid, name, type, UUID.Zero.ToString()); asset.Description = desc; asset.Local = local; -- cgit v1.1