From 1487699045876ef052e0764dc3163c1d746fe7f8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 27 May 2008 19:07:57 +0000 Subject: * Revert last commit as it opens sim owners up to all sorts of nasty scripts. * If the regex that we're using isn't good enough, we really need to make it better. --- .../ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 919d368..d132f8c 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -117,9 +117,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL Match SecurityM; // BROKEN: this check is very wrong. It block's any url in strings. - // = Regex.Match(checkscript, @"(?:[a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); - // if (SecurityM.Success) - // throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'"); + SecurityM = Regex.Match(checkscript, @"(?:[a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); + if (SecurityM.Success) + throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'"); SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); if (SecurityM.Success) -- cgit v1.1