aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs2
3 files changed, 2 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
index abcb573..41f3ef4 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
@@ -133,8 +133,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
133 { 133 {
134 using (XmlTextReader reader = new XmlTextReader(sr)) 134 using (XmlTextReader reader = new XmlTextReader(sr))
135 { 135 {
136 reader.ProhibitDtd = true;
137
138 reader.MoveToContent(); // skip possible xml declaration 136 reader.MoveToContent(); // skip possible xml declaration
139 137
140 if (reader.Name != "CoalescedObject") 138 if (reader.Name != "CoalescedObject")
@@ -149,7 +147,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
149 } 147 }
150 148
151 XmlDocument doc = new XmlDocument(); 149 XmlDocument doc = new XmlDocument();
152 doc.XmlResolver=null;
153 doc.LoadXml(xml); 150 doc.LoadXml(xml);
154 XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); 151 XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
155 if (e == null) 152 if (e == null)
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index c5a3a22..590a5d4 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
63 String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData); 63 String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData);
64 using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null)) 64 using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null))
65 { 65 {
66 using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true })) 66 using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment}))
67 { 67 {
68 try 68 try
69 { 69 {
@@ -255,7 +255,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
255 try 255 try
256 { 256 {
257 XmlDocument doc = new XmlDocument(); 257 XmlDocument doc = new XmlDocument();
258 doc.XmlResolver=null;
259 doc.LoadXml(xmlData); 258 doc.LoadXml(xmlData);
260 259
261 XmlNodeList parts = doc.GetElementsByTagName("SceneObjectPart"); 260 XmlNodeList parts = doc.GetElementsByTagName("SceneObjectPart");
@@ -271,11 +270,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
271 using(StringReader sr = new StringReader(parts[0].OuterXml)) 270 using(StringReader sr = new StringReader(parts[0].OuterXml))
272 { 271 {
273 using(XmlTextReader reader = new XmlTextReader(sr)) 272 using(XmlTextReader reader = new XmlTextReader(sr))
274 {
275 reader.ProhibitDtd = true;
276
277 sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader)); 273 sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader));
278 }
279 } 274 }
280 275
281 // Then deal with the rest 276 // Then deal with the rest
@@ -1400,7 +1395,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1400 value = reader.ReadElementContentAsString("Media", String.Empty); 1395 value = reader.ReadElementContentAsString("Media", String.Empty);
1401 shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); 1396 shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
1402 } 1397 }
1403 catch (XmlException e) 1398 catch (XmlException)
1404 { 1399 {
1405 // There are versions of OAR files that contain unquoted XML. 1400 // There are versions of OAR files that contain unquoted XML.
1406 // ie ONE comercial fork that never wanted their oars to be read by our code 1401 // ie ONE comercial fork that never wanted their oars to be read by our code
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs
index 0ebc645..42381f6 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs
@@ -49,7 +49,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
49 public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset) 49 public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset)
50 { 50 {
51 XmlDocument doc = new XmlDocument(); 51 XmlDocument doc = new XmlDocument();
52 doc.XmlResolver=null;
53 XmlNode rootNode; 52 XmlNode rootNode;
54 53
55 if (fileName.StartsWith("http:") || File.Exists(fileName)) 54 if (fileName.StartsWith("http:") || File.Exists(fileName))
@@ -57,7 +56,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
57 using(XmlTextReader reader = new XmlTextReader(fileName)) 56 using(XmlTextReader reader = new XmlTextReader(fileName))
58 { 57 {
59 reader.WhitespaceHandling = WhitespaceHandling.None; 58 reader.WhitespaceHandling = WhitespaceHandling.None;
60 reader.ProhibitDtd = true;
61 59
62 doc.Load(reader); 60 doc.Load(reader);
63 } 61 }