comment out the x.y security check in the script engine because it's so aggressive

it blocks string = "http://osgrid.org", amoung other things.
0.6.0-stable
Sean Dague 2008-05-27 18:40:49 +00:00
parent e2e692c583
commit e436120d60
1 changed files with 6 additions and 3 deletions

View File

@ -114,9 +114,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
// checks for alpha.alpha way of referring to objects in C# // checks for alpha.alpha way of referring to objects in C#
// ignores alpha.x alpha.y, alpha.z for refering to vector components // ignores alpha.x alpha.y, alpha.z for refering to vector components
Match SecurityM = Regex.Match(checkscript, @"(?:[a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); Match SecurityM;
if (SecurityM.Success)
throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'"); // 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, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
if (SecurityM.Success) if (SecurityM.Success)