From f59b55d930b4a715d2ea5b99d2b3f5494073b1ae Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 12 Jan 2011 17:40:21 +0100 Subject: Dont' trust the viewer! Fix a permission slam error caused by trusting the viewer too much. --- .../CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 4 ++++ OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 10e74ea..0163060 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -786,12 +786,16 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { rootPart.Name = item.Name; rootPart.Description = item.Description; + } + if ((item.Flags & (uint)InventoryItemFlags.ObjectSlamSale) != 0) + { rootPart.ObjectSaleType = item.SaleType; rootPart.SalePrice = item.SalePrice; } group.SetGroup(remoteClient.ActiveGroupId, remoteClient); // TODO: Remove the magic number badness + if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0 || // Magic number (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 7216b39..7fa5509 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -308,7 +308,6 @@ namespace OpenSim.Region.Framework.Scenes { if (UUID.Zero == transactionID) { - item.Flags = itemUpd.Flags; item.Name = itemUpd.Name; item.Description = itemUpd.Description; if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) -- cgit v1.1