From 8f6d508b435c0f9f15ce042a5550e5fab1db5d7a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 26 Apr 2008 07:43:11 +0000 Subject: * For info about this commit, see last commit. --- .../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index fa91544..f1e6ebf 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -86,9 +86,22 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL bool last_was_escape = false; int quote_replaced_count = 0; - Match SecurityM = Regex.Match(Script, "[;}][^\"']+System\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); - if (SecurityM.Success) - throw new Exception("BC20002: 'System' is null or not an object"); + + + string[] blocked = new string[] {"Axiom","Db4objects","libsecondlife","log4net","Microsoft", + "Modified","Mono","MonoXnaCompactMaths","mscorlib","MySql", + "NHibernate","Nini","nunit","Ode","OpenSim","PhysX_Wrapper_Dotnet", + "PumaCode","RAIL","XMLRPC","System"}; + + + for (int p = 0; p < blocked.Length;p++) + { + + Match SecurityM = Regex.Match(Script, "[;}][^\"']+" + blocked[p].Replace(".", "\\.") + "\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); + if (SecurityM.Success) + throw new Exception("CS0103: 'The name '" + blocked[p] + "' does not exist in the current context'"); + + } for (int p = 0; p < Script.Length; p++) { -- cgit v1.1