diff options
author | UbitUmarov | 2018-01-05 12:24:07 +0000 |
---|---|---|
committer | UbitUmarov | 2018-01-05 12:24:07 +0000 |
commit | 89a690c11f8c7b6bbe0b6339e79a64d1ae428aec (patch) | |
tree | eb039c92222bf22359a20ecb5294b8ab1b2a38eb | |
parent | don't be bad Jenkins.. (diff) | |
download | opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.zip opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.tar.gz opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.tar.bz2 opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.tar.xz |
a few more xml things
20 files changed, 91 insertions, 33 deletions
diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs index 76e439f..5ed312c 100644 --- a/OpenSim/Capabilities/LLSD.cs +++ b/OpenSim/Capabilities/LLSD.cs | |||
@@ -83,6 +83,9 @@ namespace OpenSim.Framework.Capabilities | |||
83 | { | 83 | { |
84 | using (XmlTextReader reader = new XmlTextReader(st)) | 84 | using (XmlTextReader reader = new XmlTextReader(st)) |
85 | { | 85 | { |
86 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
87 | reader.XmlResolver = null; | ||
88 | |||
86 | reader.Read(); | 89 | reader.Read(); |
87 | SkipWS(reader); | 90 | SkipWS(reader); |
88 | 91 | ||
diff --git a/OpenSim/Framework/PhysicsInertia.cs b/OpenSim/Framework/PhysicsInertia.cs index 6e15791..8a0e43e 100644 --- a/OpenSim/Framework/PhysicsInertia.cs +++ b/OpenSim/Framework/PhysicsInertia.cs | |||
@@ -187,16 +187,18 @@ namespace OpenSim.Framework | |||
187 | if (text == String.Empty) | 187 | if (text == String.Empty) |
188 | return null; | 188 | return null; |
189 | 189 | ||
190 | UTF8Encoding enc = new UTF8Encoding(); | ||
191 | MemoryStream ms = new MemoryStream(enc.GetBytes(text)); | ||
192 | XmlTextReader xreader = new XmlTextReader(ms); | ||
193 | |||
194 | PhysicsInertiaData v = new PhysicsInertiaData(); | ||
195 | bool error; | 190 | bool error; |
191 | PhysicsInertiaData v; | ||
192 | UTF8Encoding enc = new UTF8Encoding(); | ||
193 | using(MemoryStream ms = new MemoryStream(enc.GetBytes(text))) | ||
194 | using(XmlTextReader xreader = new XmlTextReader(ms)) | ||
195 | { | ||
196 | xreader.DtdProcessing = DtdProcessing.Prohibit; | ||
197 | xreader.XmlResolver = null; | ||
196 | 198 | ||
197 | v.FromXml2(xreader, out error); | 199 | v = new PhysicsInertiaData(); |
198 | 200 | v.FromXml2(xreader, out error); | |
199 | xreader.Close(); | 201 | } |
200 | 202 | ||
201 | if (error) | 203 | if (error) |
202 | return null; | 204 | return null; |
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 5056c04..1dc8bc3 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -1595,6 +1595,9 @@ namespace OpenSim.Framework | |||
1595 | { | 1595 | { |
1596 | using (XmlTextReader xtr = new XmlTextReader(sr)) | 1596 | using (XmlTextReader xtr = new XmlTextReader(sr)) |
1597 | { | 1597 | { |
1598 | xtr.DtdProcessing = DtdProcessing.Prohibit; | ||
1599 | xtr.XmlResolver = null; | ||
1600 | |||
1598 | xtr.MoveToContent(); | 1601 | xtr.MoveToContent(); |
1599 | 1602 | ||
1600 | string type = xtr.GetAttribute("type"); | 1603 | string type = xtr.GetAttribute("type"); |
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs index d2ca049..da877a7 100644 --- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs +++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs | |||
@@ -221,7 +221,7 @@ namespace OpenSim.Framework.Serialization.External | |||
221 | using (StringWriter sw = new StringWriter()) | 221 | using (StringWriter sw = new StringWriter()) |
222 | using (XmlTextWriter writer = new XmlTextWriter(sw)) | 222 | using (XmlTextWriter writer = new XmlTextWriter(sw)) |
223 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 223 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) |
224 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | 224 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) |
225 | { | 225 | { |
226 | TransformXml(reader, writer, sceneName, homeURL, userService, scopeID); | 226 | TransformXml(reader, writer, sceneName, homeURL, userService, scopeID); |
227 | 227 | ||
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs index e42d56f..d323f45 100644 --- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs +++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs | |||
@@ -178,6 +178,8 @@ namespace OpenSim.Framework.Serialization.External | |||
178 | 178 | ||
179 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData))) | 179 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData))) |
180 | { | 180 | { |
181 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
182 | reader.XmlResolver = null; | ||
181 | reader.ReadStartElement("LandData"); | 183 | reader.ReadStartElement("LandData"); |
182 | 184 | ||
183 | ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader); | 185 | ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader); |
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs index 617c451..fb4f904 100644 --- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs +++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs | |||
@@ -63,6 +63,8 @@ namespace OpenSim.Framework.Serialization.External | |||
63 | 63 | ||
64 | StringReader sr = new StringReader(serializedSettings); | 64 | StringReader sr = new StringReader(serializedSettings); |
65 | XmlTextReader xtr = new XmlTextReader(sr); | 65 | XmlTextReader xtr = new XmlTextReader(sr); |
66 | xtr.DtdProcessing = DtdProcessing.Prohibit; | ||
67 | xtr.XmlResolver = null; | ||
66 | 68 | ||
67 | xtr.ReadStartElement("RegionSettings"); | 69 | xtr.ReadStartElement("RegionSettings"); |
68 | 70 | ||
diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs index 9b02553..3c51140 100644 --- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs +++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs | |||
@@ -202,6 +202,9 @@ namespace OpenSim.Framework.Serialization.External | |||
202 | 202 | ||
203 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization))) | 203 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization))) |
204 | { | 204 | { |
205 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
206 | reader.XmlResolver = null; | ||
207 | |||
205 | reader.ReadStartElement("InventoryItem"); | 208 | reader.ReadStartElement("InventoryItem"); |
206 | 209 | ||
207 | ExternalRepresentationUtils.ExecuteReadProcessors<InventoryItemBase>( | 210 | ExternalRepresentationUtils.ExecuteReadProcessors<InventoryItemBase>( |
diff --git a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs b/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs index bd55657..fbc51d5 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs | |||
@@ -54,6 +54,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
54 | TRequest deserial; | 54 | TRequest deserial; |
55 | using (XmlTextReader xmlReader = new XmlTextReader(request)) | 55 | using (XmlTextReader xmlReader = new XmlTextReader(request)) |
56 | { | 56 | { |
57 | xmlReader.DtdProcessing = DtdProcessing.Prohibit; | ||
58 | xmlReader.XmlResolver = null; | ||
59 | |||
57 | XmlSerializer deserializer = new XmlSerializer(typeof (TRequest)); | 60 | XmlSerializer deserializer = new XmlSerializer(typeof (TRequest)); |
58 | deserial = (TRequest) deserializer.Deserialize(xmlReader); | 61 | deserial = (TRequest) deserializer.Deserialize(xmlReader); |
59 | } | 62 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs index 68073c1..dc720dd 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs | |||
@@ -210,6 +210,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
210 | { | 210 | { |
211 | try | 211 | try |
212 | { | 212 | { |
213 | xmlReader.DtdProcessing = DtdProcessing.Prohibit; | ||
214 | xmlReader.XmlResolver = null; | ||
213 | XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>)); | 215 | XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>)); |
214 | deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader); | 216 | deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader); |
215 | } | 217 | } |
@@ -269,6 +271,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
269 | { | 271 | { |
270 | try | 272 | try |
271 | { | 273 | { |
274 | xmlReader.DtdProcessing = DtdProcessing.Prohibit; | ||
275 | xmlReader.XmlResolver = null; | ||
272 | XmlSerializer deserializer = new XmlSerializer(typeof(TRequest)); | 276 | XmlSerializer deserializer = new XmlSerializer(typeof(TRequest)); |
273 | deserial = (TRequest)deserializer.Deserialize(xmlReader); | 277 | deserial = (TRequest)deserializer.Deserialize(xmlReader); |
274 | } | 278 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index cfa9581..013b416 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs | |||
@@ -124,6 +124,8 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures | |||
124 | { | 124 | { |
125 | using(XmlTextReader sr = new XmlTextReader(s)) | 125 | using(XmlTextReader sr = new XmlTextReader(s)) |
126 | { | 126 | { |
127 | sr.DtdProcessing = DtdProcessing.Prohibit; | ||
128 | sr.XmlResolver = null; | ||
127 | sr.ReadStartElement("BakedAppearance"); | 129 | sr.ReadStartElement("BakedAppearance"); |
128 | while(sr.LocalName == "BakedTexture") | 130 | while(sr.LocalName == "BakedTexture") |
129 | { | 131 | { |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 99ff9b5..63ebf86 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -1130,6 +1130,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
1130 | XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); | 1130 | XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); |
1131 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); | 1131 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); |
1132 | XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); | 1132 | XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); |
1133 | xtr.DtdProcessing = DtdProcessing.Prohibit; | ||
1134 | xtr.XmlResolver = null; | ||
1133 | 1135 | ||
1134 | // Loaded metadata will be empty if no information exists in the archive | 1136 | // Loaded metadata will be empty if no information exists in the archive |
1135 | dearchivedScenes.LoadedCreationDateTime = 0; | 1137 | dearchivedScenes.LoadedCreationDateTime = 0; |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs index 8c0ef88..92c935b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs | |||
@@ -93,6 +93,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
93 | 93 | ||
94 | StringReader sr = new StringReader(xml); | 94 | StringReader sr = new StringReader(xml); |
95 | XmlTextReader reader = new XmlTextReader(sr); | 95 | XmlTextReader reader = new XmlTextReader(sr); |
96 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
97 | reader.XmlResolver = null; | ||
96 | 98 | ||
97 | reader.ReadStartElement("assets"); | 99 | reader.ReadStartElement("assets"); |
98 | reader.Read(); | 100 | reader.Read(); |
diff --git a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs index b8db3a9..38ab934 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs | |||
@@ -58,7 +58,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
58 | 58 | ||
59 | using (XmlTextReader reader = new XmlTextReader(path)) | 59 | using (XmlTextReader reader = new XmlTextReader(path)) |
60 | { | 60 | { |
61 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
62 | reader.XmlResolver = null; | ||
61 | XmlDocument doc = new XmlDocument(); | 63 | XmlDocument doc = new XmlDocument(); |
64 | doc.XmlResolver = null; | ||
65 | |||
62 | doc.Load(reader); | 66 | doc.Load(reader); |
63 | // if (doc.DocumentElement != null) | 67 | // if (doc.DocumentElement != null) |
64 | // { | 68 | // { |
diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs index 351eda3..22734b3 100644 --- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs +++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs | |||
@@ -593,6 +593,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
593 | UTF8Encoding enc = new UTF8Encoding(); | 593 | UTF8Encoding enc = new UTF8Encoding(); |
594 | MemoryStream ms = new MemoryStream(enc.GetBytes(text)); | 594 | MemoryStream ms = new MemoryStream(enc.GetBytes(text)); |
595 | XmlTextReader xreader = new XmlTextReader(ms); | 595 | XmlTextReader xreader = new XmlTextReader(ms); |
596 | xreader.DtdProcessing = DtdProcessing.Prohibit; | ||
597 | xreader.XmlResolver = null; | ||
596 | 598 | ||
597 | SOPVehicle v = new SOPVehicle(); | 599 | SOPVehicle v = new SOPVehicle(); |
598 | bool error; | 600 | bool error; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 71c8807..84367df 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2389 | { | 2389 | { |
2390 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 2390 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) |
2391 | { | 2391 | { |
2392 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | 2392 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) |
2393 | { | 2393 | { |
2394 | reader.Read(); | 2394 | reader.Read(); |
2395 | bool isSingleObject = reader.Name != "CoalescedObject"; | 2395 | bool isSingleObject = reader.Name != "CoalescedObject"; |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs index a93782e..c3bc4a0 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs | |||
@@ -133,6 +133,9 @@ 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.DtdProcessing = DtdProcessing.Prohibit; | ||
137 | reader.XmlResolver = null; | ||
138 | |||
136 | reader.MoveToContent(); // skip possible xml declaration | 139 | reader.MoveToContent(); // skip possible xml declaration |
137 | 140 | ||
138 | if (reader.Name != "CoalescedObject") | 141 | if (reader.Name != "CoalescedObject") |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 948c345..a2d512a 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 })) | 66 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) |
67 | { | 67 | { |
68 | try | 68 | try |
69 | { | 69 | { |
@@ -267,18 +267,29 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
267 | return null; | 267 | return null; |
268 | } | 268 | } |
269 | 269 | ||
270 | StringReader sr = new StringReader(parts[0].OuterXml); | 270 | SceneObjectGroup sceneObject; |
271 | XmlTextReader reader = new XmlTextReader(sr); | 271 | using(StringReader sr = new StringReader(parts[0].OuterXml)) |
272 | SceneObjectGroup sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader)); | 272 | { |
273 | reader.Close(); | 273 | using(XmlTextReader reader = new XmlTextReader(sr)) |
274 | sr.Close(); | 274 | { |
275 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
276 | reader.XmlResolver = null; | ||
277 | |||
278 | sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader)); | ||
279 | } | ||
280 | } | ||
275 | 281 | ||
276 | // Then deal with the rest | 282 | // Then deal with the rest |
283 | SceneObjectPart part; | ||
277 | for (int i = 1; i < parts.Count; i++) | 284 | for (int i = 1; i < parts.Count; i++) |
278 | { | 285 | { |
279 | sr = new StringReader(parts[i].OuterXml); | 286 | using(StringReader sr = new StringReader(parts[i].OuterXml)) |
280 | reader = new XmlTextReader(sr); | 287 | { |
281 | SceneObjectPart part = SceneObjectPart.FromXml(reader); | 288 | using(XmlTextReader reader = new XmlTextReader(sr)) |
289 | { | ||
290 | part = SceneObjectPart.FromXml(reader); | ||
291 | } | ||
292 | } | ||
282 | 293 | ||
283 | int originalLinkNum = part.LinkNum; | 294 | int originalLinkNum = part.LinkNum; |
284 | 295 | ||
@@ -289,8 +300,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
289 | if (originalLinkNum != 0) | 300 | if (originalLinkNum != 0) |
290 | part.LinkNum = originalLinkNum; | 301 | part.LinkNum = originalLinkNum; |
291 | 302 | ||
292 | reader.Close(); | ||
293 | sr.Close(); | ||
294 | } | 303 | } |
295 | 304 | ||
296 | XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion"); | 305 | XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion"); |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index 34fdb6d..977dd73 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs | |||
@@ -49,14 +49,19 @@ 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; | ||
52 | XmlNode rootNode; | 53 | XmlNode rootNode; |
53 | 54 | ||
54 | if (fileName.StartsWith("http:") || File.Exists(fileName)) | 55 | if (fileName.StartsWith("http:") || File.Exists(fileName)) |
55 | { | 56 | { |
56 | XmlTextReader reader = new XmlTextReader(fileName); | 57 | using(XmlTextReader reader = new XmlTextReader(fileName)) |
57 | reader.WhitespaceHandling = WhitespaceHandling.None; | 58 | { |
58 | doc.Load(reader); | 59 | reader.WhitespaceHandling = WhitespaceHandling.None; |
59 | reader.Close(); | 60 | reader.DtdProcessing = DtdProcessing.Prohibit; |
61 | reader.XmlResolver = null; | ||
62 | |||
63 | doc.Load(reader); | ||
64 | } | ||
60 | rootNode = doc.FirstChild; | 65 | rootNode = doc.FirstChild; |
61 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) | 66 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) |
62 | { | 67 | { |
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 89d78cf..1beca04 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs | |||
@@ -196,13 +196,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
196 | // ITerrainChannel.LoadFromXmlString() | 196 | // ITerrainChannel.LoadFromXmlString() |
197 | public void LoadFromXmlString(string data) | 197 | public void LoadFromXmlString(string data) |
198 | { | 198 | { |
199 | StringReader sr = new StringReader(data); | 199 | using(StringReader sr = new StringReader(data)) |
200 | XmlTextReader reader = new XmlTextReader(sr); | 200 | { |
201 | reader.Read(); | 201 | using(XmlTextReader reader = new XmlTextReader(sr)) |
202 | 202 | { | |
203 | ReadXml(reader); | 203 | reader.DtdProcessing = DtdProcessing.Prohibit; |
204 | reader.Close(); | 204 | reader.XmlResolver = null; |
205 | sr.Close(); | 205 | ReadXml(reader); |
206 | } | ||
207 | } | ||
206 | } | 208 | } |
207 | 209 | ||
208 | // ITerrainChannel.Merge | 210 | // ITerrainChannel.Merge |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 57930d7..08242b6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -1125,6 +1125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1125 | return null; | 1125 | return null; |
1126 | 1126 | ||
1127 | doc = new XmlDocument(); | 1127 | doc = new XmlDocument(); |
1128 | doc.XmlResolver = null; | ||
1128 | 1129 | ||
1129 | // Let's serialize all calls to Vivox. Most of these are driven by | 1130 | // Let's serialize all calls to Vivox. Most of these are driven by |
1130 | // the clients (CAPs), when the user arrives at the region. We don't | 1131 | // the clients (CAPs), when the user arrives at the region. We don't |
@@ -1146,7 +1147,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1146 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) | 1147 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) |
1147 | using (Stream s = rsp.GetResponseStream()) | 1148 | using (Stream s = rsp.GetResponseStream()) |
1148 | using (XmlTextReader rdr = new XmlTextReader(s)) | 1149 | using (XmlTextReader rdr = new XmlTextReader(s)) |
1149 | doc.Load(rdr); | 1150 | { |
1151 | rdr.DtdProcessing = DtdProcessing.Prohibit; | ||
1152 | rdr.XmlResolver = null; | ||
1153 | doc.Load(rdr); | ||
1154 | } | ||
1150 | } | 1155 | } |
1151 | catch (Exception e) | 1156 | catch (Exception e) |
1152 | { | 1157 | { |