aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-09-27 00:34:30 +0100
committerMelanie2010-09-27 00:34:30 +0100
commitaaa4cb64a4739c15ce392dcd2f80b1485e96d3b9 (patch)
treea01f39eba0f894dd80c2d2665c9701125d93fc89
parentRestrict inventory items added in a transaction to folder belonging (diff)
downloadopensim-SC_OLD-aaa4cb64a4739c15ce392dcd2f80b1485e96d3b9.zip
opensim-SC_OLD-aaa4cb64a4739c15ce392dcd2f80b1485e96d3b9.tar.gz
opensim-SC_OLD-aaa4cb64a4739c15ce392dcd2f80b1485e96d3b9.tar.bz2
opensim-SC_OLD-aaa4cb64a4739c15ce392dcd2f80b1485e96d3b9.tar.xz
if you can't edit a prim's inventory, you don't need to see the asset ids.
Prevents stealing IDs of animations, sounds and textures from prim inventories. Prevents copybot from gathering the wearable UUIDs needed for pirating things from vendors.
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 210f5cd..02d3991 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -811,8 +811,13 @@ namespace OpenSim.Region.Framework.Scenes
811 // isn't available (such as drag from prim inventory to agent inventory) 811 // isn't available (such as drag from prim inventory to agent inventory)
812 InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero); 812 InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero);
813 813
814 List<TaskInventoryItem> items = GetInventoryItems(); 814 bool includeAssets = false;
815 foreach (TaskInventoryItem item in items) 815 if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId))
816 includeAssets = true;
817
818 m_items.LockItemsForRead(true);
819
820 foreach (TaskInventoryItem item in m_items.Values)
816 { 821 {
817 UUID ownerID = item.OwnerID; 822 UUID ownerID = item.OwnerID;
818 uint everyoneMask = 0; 823 uint everyoneMask = 0;
@@ -840,7 +845,10 @@ namespace OpenSim.Region.Framework.Scenes
840 invString.AddNameValueLine("group_id", item.GroupID.ToString()); 845 invString.AddNameValueLine("group_id", item.GroupID.ToString());
841 invString.AddSectionEnd(); 846 invString.AddSectionEnd();
842 847
843 invString.AddNameValueLine("asset_id", item.AssetID.ToString()); 848 if (includeAssets)
849 invString.AddNameValueLine("asset_id", item.AssetID.ToString());
850 else
851 invString.AddNameValueLine("asset_id", UUID.Zero.ToString());
844 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); 852 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
845 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); 853 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
846 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); 854 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));