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
iar_mods
Justin Clark-Casey (justincc) 2012-02-10 19:58:34 +00:00
parent 7273e05995
commit 44d84bc277
2 changed files with 12 additions and 3 deletions

View File

@ -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);

View File

@ -148,7 +148,8 @@ namespace OpenSim.Region.Framework.Scenes
x = m_inventoryDeletes.Dequeue();
m_log.DebugFormat(
"[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", left, x.action, x.objectGroups.Count);
"[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.",
left, x.action, x.objectGroups.Count);
try
{