diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index c14ce1e..dde54d5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -37,6 +37,7 @@ using OpenMetaverse; | |||
37 | using OpenMetaverse.Packets; | 37 | using OpenMetaverse.Packets; |
38 | using log4net; | 38 | using log4net; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Serialization.External; | ||
40 | using OpenSim.Region.Framework; | 41 | using OpenSim.Region.Framework; |
41 | using OpenSim.Framework.Client; | 42 | using OpenSim.Framework.Client; |
42 | using OpenSim.Region.Framework.Interfaces; | 43 | using OpenSim.Region.Framework.Interfaces; |
@@ -2225,7 +2226,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2225 | bbox = Vector3.Zero; | 2226 | bbox = Vector3.Zero; |
2226 | offsetHeight = 0; | 2227 | offsetHeight = 0; |
2227 | 2228 | ||
2228 | string xmlData = Utils.BytesToString(assetData); | 2229 | string xmlData = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(assetData)); |
2229 | 2230 | ||
2230 | try | 2231 | try |
2231 | { | 2232 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index cb13ca4..463ef22 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | 53 | ||
54 | private static IUserManagement m_UserManagement; | 54 | private static IUserManagement m_UserManagement; |
55 | 55 | ||
56 | /// <summary> | 56 | /// <summary> |
57 | /// Deserialize a scene object from the original xml format | 57 | /// Deserialize a scene object from the original xml format |
58 | /// </summary> | 58 | /// </summary> |
@@ -60,7 +60,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
60 | /// <returns>The scene object deserialized. Null on failure.</returns> | 60 | /// <returns>The scene object deserialized. Null on failure.</returns> |
61 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) | 61 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) |
62 | { | 62 | { |
63 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 63 | String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData); |
64 | using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null)) | ||
64 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | 65 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) |
65 | return FromOriginalXmlFormat(reader); | 66 | return FromOriginalXmlFormat(reader); |
66 | } | 67 | } |
@@ -322,7 +323,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
322 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 323 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
323 | CoalescedSceneObjects coa = null; | 324 | CoalescedSceneObjects coa = null; |
324 | 325 | ||
325 | string xmlData = Utils.BytesToString(data); | 326 | string xmlData = ExternalRepresentationUtils.SanitizeXml(Utils.BytesToString(data)); |
326 | 327 | ||
327 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) | 328 | if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa)) |
328 | { | 329 | { |