From c9276f20518d3e6895ace534a1098f49eb2dbf1c Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 16 Jan 2010 04:38:24 +0000 Subject: Shorten the names of the tags in monitorstats summary to the immediate type name sans namespace. Needs adjustment of scripts using these!. Request my name still uses full namespace path. --- OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index d84f4ea..96d65d7 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs @@ -112,7 +112,11 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring string xml = ""; foreach (IMonitor monitor in m_monitors) { - xml += "<" + monitor.ToString() + ">" + monitor.GetValue() + ""; + string elemName = monitor.ToString(); + if (elemName.StartsWith(monitor.GetType().Namespace)) + elemName = elemName.Substring(monitor.GetType().Namespace.Length + 1); + + xml += "<" + elemName + ">" + monitor.GetValue() + ""; } xml += ""; -- cgit v1.1 From 74b3ce857228ae948d99ad4b6ef35f35e7742b2c Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 16 Jan 2010 04:57:49 +0000 Subject: Let monitor data be requested using either the short form of the name or the full, namespace qualified version. --- OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index 96d65d7..f15f8f6 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs @@ -87,7 +87,10 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring foreach (IMonitor monitor in m_monitors) { - if (monitor.ToString() == monID) + string elemName = monitor.ToString(); + if (elemName.StartsWith(monitor.GetType().Namespace)) + elemName = elemName.Substring(monitor.GetType().Namespace.Length + 1); + if (elemName == monID || monitor.ToString() == monID) { Hashtable ereply3 = new Hashtable(); -- cgit v1.1 From 3ff28e7a8f6a7816dd76307c36153ba8f393dea1 Mon Sep 17 00:00:00 2001 From: CasperW Date: Mon, 18 Jan 2010 17:56:27 +0100 Subject: Fix a major security problem with osSetDynamicTexture which allowed the deletion of /any/ asset. --- .../Scripting/DynamicTexture/DynamicTextureModule.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index f51d0c2..679c871 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -358,11 +358,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture // tmptex.DefaultTexture.Fullbright = true; part.UpdateTexture(tmptex); - } - - if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) - { - scene.AssetService.Delete(oldID.ToString()); + } + + if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) + { + if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString()); + if (oldAsset != null) + { + if (oldAsset.Temporary == true) + { + scene.AssetService.Delete(oldID.ToString()); + } + } } } -- cgit v1.1