From c7179ff45452c49e0e517fa6acd5061bc76b0c36 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Tue, 12 Feb 2013 23:21:49 -0800 Subject: [PATCH] Make path parsing more robust in the JsonStore. --- .../Scripting/JsonStore/JsonStore.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs index c94638ff2b..1abdbfc416 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs @@ -68,14 +68,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore protected List m_TakeStore; protected List m_ReadStore; - // add separators for quoted paths - protected static Regex m_ParsePassOne = new Regex("{[^}]+}"); - - // add separators for array references - protected static Regex m_ParsePassTwo = new Regex("(\\[[0-9]+\\]|\\[\\+\\])"); + // add separators for quoted paths and array references + protected static Regex m_ParsePassOne = new Regex("({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])"); // add quotes to bare identifiers which are limited to alphabetic characters - protected static Regex m_ParsePassThree = new Regex("\\.([a-zA-Z]+)"); + protected static Regex m_ParsePassThree = new Regex("(?