From 61008c9c13e88e1979fd339257497fb079170507 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 8 Jul 2009 20:57:26 +0000 Subject: Thank you kindly, SnowDrop, for a patch that: This add a configuration option to the MRM module called "hidden". if MRM is marked as enabled, the module will additionally check for the "Hidden" flag, before registering for client side scriping events. When MRM is running hidden, it will not respond to client side scripting events, giving serverside scripting modules, like MRMLoader and MRMAddin the ability to leverage the MRM engine. This way, even a possible clientside exploit will not be possible, while still allowing the MRM engine to run. --- .../Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index c4648d2..2b84016 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs @@ -67,7 +67,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { m_log.Info("[MRM] Enabling MRM Module"); m_scene = scene; - scene.EventManager.OnRezScript += EventManager_OnRezScript; + + // when hidden, we don't listen for client initiated script events + // only making the MRM engine available for region modules + if(!source.Configs["MRM"].GetBoolean("Hidden", false)) + { + scene.EventManager.OnRezScript += EventManager_OnRezScript; + } + scene.EventManager.OnFrame += EventManager_OnFrame; scene.RegisterModuleInterface(this); @@ -158,7 +165,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule m_microthreads); mmb.InitMiniModule(m_world, m_host, itemID); - } public void PostInitialise() @@ -192,7 +198,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// internal string CompileFromDotNetText(string Script, string uuid) { - m_log.Info("MRM 1"); + m_log.Info("MRM 1"); const string ext = ".cs"; const string FilePrefix = "MiniModule"; -- cgit v1.1