diff options
author | Melanie | 2011-01-08 13:51:34 +0100 |
---|---|---|
committer | Melanie | 2011-01-08 13:51:34 +0100 |
commit | 1ab9cd0997b30eae24b0fc609d7d8598e5a549fc (patch) | |
tree | 90bf30f41b4024c45181d68b27919e189304da03 /OpenSim/Region | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-1ab9cd0997b30eae24b0fc609d7d8598e5a549fc.zip opensim-SC_OLD-1ab9cd0997b30eae24b0fc609d7d8598e5a549fc.tar.gz opensim-SC_OLD-1ab9cd0997b30eae24b0fc609d7d8598e5a549fc.tar.bz2 opensim-SC_OLD-1ab9cd0997b30eae24b0fc609d7d8598e5a549fc.tar.xz |
Fix a couple of security issues
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 682c36d..5658f90 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2025,6 +2025,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2025 | 2025 | ||
2026 | public void SetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID, bool running) | 2026 | public void SetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID, bool running) |
2027 | { | 2027 | { |
2028 | if (!Permissions.CanEditScript(itemID, objectID, controllingClient.AgentId)) | ||
2029 | return; | ||
2030 | |||
2028 | SceneObjectPart part = GetSceneObjectPart(objectID); | 2031 | SceneObjectPart part = GetSceneObjectPart(objectID); |
2029 | if (part == null) | 2032 | if (part == null) |
2030 | return; | 2033 | return; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 970003a..5a39941 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -48,6 +48,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
48 | private string m_inventoryFileName = String.Empty; | 48 | private string m_inventoryFileName = String.Empty; |
49 | private byte[] m_inventoryFileData = new byte[0]; | 49 | private byte[] m_inventoryFileData = new byte[0]; |
50 | private uint m_inventoryFileNameSerial = 0; | 50 | private uint m_inventoryFileNameSerial = 0; |
51 | private bool m_inventoryPrivileged = false; | ||
51 | 52 | ||
52 | private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); | 53 | private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); |
53 | 54 | ||
@@ -952,6 +953,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
952 | { | 953 | { |
953 | bool changed = CreateInventoryFileName(); | 954 | bool changed = CreateInventoryFileName(); |
954 | 955 | ||
956 | bool includeAssets = false; | ||
957 | if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId)) | ||
958 | includeAssets = true; | ||
959 | |||
960 | if (m_inventoryPrivileged != includeAssets) | ||
961 | changed = true; | ||
962 | |||
955 | InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero); | 963 | InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero); |
956 | 964 | ||
957 | Items.LockItemsForRead(true); | 965 | Items.LockItemsForRead(true); |
@@ -977,9 +985,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
977 | } | 985 | } |
978 | } | 986 | } |
979 | 987 | ||
980 | bool includeAssets = false; | 988 | m_inventoryPrivileged = includeAssets; |
981 | if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId)) | ||
982 | includeAssets = true; | ||
983 | 989 | ||
984 | foreach (TaskInventoryItem item in m_items.Values) | 990 | foreach (TaskInventoryItem item in m_items.Values) |
985 | { | 991 | { |