diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 9 |
1 files changed, 2 insertions, 7 deletions
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 |