aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs19
1 files changed, 16 insertions, 3 deletions
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
86 bool last_was_escape = false; 86 bool last_was_escape = false;
87 int quote_replaced_count = 0; 87 int quote_replaced_count = 0;
88 88
89 Match SecurityM = Regex.Match(Script, "[;}][^\"']+System\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); 89
90 if (SecurityM.Success) 90
91 throw new Exception("BC20002: 'System' is null or not an object"); 91 string[] blocked = new string[] {"Axiom","Db4objects","libsecondlife","log4net","Microsoft",
92 "Modified","Mono","MonoXnaCompactMaths","mscorlib","MySql",
93 "NHibernate","Nini","nunit","Ode","OpenSim","PhysX_Wrapper_Dotnet",
94 "PumaCode","RAIL","XMLRPC","System"};
95
96
97 for (int p = 0; p < blocked.Length;p++)
98 {
99
100 Match SecurityM = Regex.Match(Script, "[;}][^\"']+" + blocked[p].Replace(".", "\\.") + "\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);
101 if (SecurityM.Success)
102 throw new Exception("CS0103: 'The name '" + blocked[p] + "' does not exist in the current context'");
103
104 }
92 105
93 for (int p = 0; p < Script.Length; p++) 106 for (int p = 0; p < Script.Length; p++)
94 { 107 {