From 44d84bc2779165e75224975e83ca4539a00e9d24 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 10 Feb 2012 19:58:34 +0000 Subject: Fix bug where somebody taking a copy of an object they didn't own that was rezzed before the region was restarted would wrongly place the copy in the object owner's inventory. Addresses http://opensimulator.org/mantis/view.php?id=5825 --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 8b5b1a7..63ba3d3 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -546,12 +546,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return null; userID = remoteClient.AgentId; + +// m_log.DebugFormat( +// "[INVENTORY ACCESS MODULE]: Target of {0} in CreateItemForObject() is {1} {2}", +// action, remoteClient.Name, userID); } else { // All returns / deletes go to the object owner // userID = so.RootPart.OwnerID; + +// m_log.DebugFormat( +// "[INVENTORY ACCESS MODULE]: Target of {0} in CreateItemForObject() is object owner {1}", +// action, userID); } if (userID == UUID.Zero) // Can't proceed @@ -637,11 +645,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } // Override and put into where it came from, if it came - // from anywhere in inventory + // from anywhere in inventory and the owner is taking it back. // if (action == DeRezAction.Take || action == DeRezAction.TakeCopy) { - if (so.RootPart.FromFolderID != UUID.Zero) + if (so.RootPart.FromFolderID != UUID.Zero && userID == remoteClient.AgentId) { InventoryFolderBase f = new InventoryFolderBase(so.RootPart.FromFolderID, userID); folder = m_Scene.InventoryService.GetFolder(f); -- cgit v1.1