aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-29 16:21:41 +0000
committerTeravus Ovares2008-05-29 16:21:41 +0000
commit83bd85ce7fed09be34df870dd6473c123e592744 (patch)
tree9240ac61600a1a1b1b5f445782010e0899920790 /OpenSim/Region/ScriptEngine/DotNetEngine
parentthis is a snapshot of the OSHttpServer work-in-progress. it's an initial skel... (diff)
downloadopensim-SC_OLD-83bd85ce7fed09be34df870dd6473c123e592744.zip
opensim-SC_OLD-83bd85ce7fed09be34df870dd6473c123e592744.tar.gz
opensim-SC_OLD-83bd85ce7fed09be34df870dd6473c123e592744.tar.bz2
opensim-SC_OLD-83bd85ce7fed09be34df870dd6473c123e592744.tar.xz
* Fix string literal with URL + LLcommand();
* Added 'detected around: value' when a x.Y detect occurs to help debug. * Fixed object text is too long to store to the database (wikilith)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index a40b95b..10380f2 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
42 // c Style 42 // c Style
43 private Regex cstylecomments = new Regex(@"/\*(.|[\r\n])*?\*/", RegexOptions.Compiled | RegexOptions.Multiline); 43 private Regex cstylecomments = new Regex(@"/\*(.|[\r\n])*?\*/", RegexOptions.Compiled | RegexOptions.Multiline);
44 // c# one liners 44 // c# one liners
45 private Regex nonCommentFwsl = new Regex("\"[a-zA-Z0-9.,:/ ]+//[^\"]+(" + @"[\\" + "\"]+)?[\"](\\s+)?;", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 45 private Regex nonCommentFwsl = new Regex("\"[a-zA-Z0-9.,:/\\n ]+//[^\"+]+([\\\\\\\"+]+)?(\\s+)?[\"+](\\s+)?(;)?", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
46 private Regex conelinecomments = new Regex(@"[^:].?([\/]{2}[^\n]*)|([\n]{1,}[\/]{2}[^\n]*)", RegexOptions.Compiled | RegexOptions.Multiline); 46 private Regex conelinecomments = new Regex(@"[^:].?([\/]{2}[^\n]*)|([\n]{1,}[\/]{2}[^\n]*)", RegexOptions.Compiled | RegexOptions.Multiline);
47 // ([^\"])((?:[a-zA-Z])\.[a-zA-Z].?)([^\"]) 47 // ([^\"])((?:[a-zA-Z])\.[a-zA-Z].?)([^\"])
48 48
@@ -121,10 +121,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
121 // ignores alpha.x alpha.y, alpha.z for refering to vector components 121 // ignores alpha.x alpha.y, alpha.z for refering to vector components
122 Match SecurityM; 122 Match SecurityM;
123 123
124 // BROKEN: this check is very wrong. It block's any url in strings. 124
125 SecurityM = Regex.Match(checkscript, @"(?:[a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 125 SecurityM = Regex.Match(checkscript, @"([a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
126 if (SecurityM.Success) 126 if (SecurityM.Success)
127 throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'"); 127 throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'. Detected around: " + SecurityM.Captures[0].Value);
128 128
129 SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 129 SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
130 if (SecurityM.Success) 130 if (SecurityM.Success)