diff options
Diffstat (limited to 'OpenSim/Framework')
8 files changed, 28 insertions, 9 deletions
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 | } |