Merge branch 'master' into httptests
commit
b903287dd1
|
@ -83,8 +83,7 @@ namespace OpenSim.Framework.Capabilities
|
||||||
{
|
{
|
||||||
using (XmlTextReader reader = new XmlTextReader(st))
|
using (XmlTextReader reader = new XmlTextReader(st))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
|
|
||||||
reader.Read();
|
reader.Read();
|
||||||
SkipWS(reader);
|
SkipWS(reader);
|
||||||
|
|
|
@ -193,8 +193,7 @@ namespace OpenSim.Framework
|
||||||
using(MemoryStream ms = new MemoryStream(enc.GetBytes(text)))
|
using(MemoryStream ms = new MemoryStream(enc.GetBytes(text)))
|
||||||
using(XmlTextReader xreader = new XmlTextReader(ms))
|
using(XmlTextReader xreader = new XmlTextReader(ms))
|
||||||
{
|
{
|
||||||
xreader.DtdProcessing = DtdProcessing.Prohibit;
|
xreader.ProhibitDtd = true;
|
||||||
xreader.XmlResolver = null;
|
|
||||||
|
|
||||||
v = new PhysicsInertiaData();
|
v = new PhysicsInertiaData();
|
||||||
v.FromXml2(xreader, out error);
|
v.FromXml2(xreader, out error);
|
||||||
|
|
|
@ -1595,8 +1595,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
using (XmlTextReader xtr = new XmlTextReader(sr))
|
using (XmlTextReader xtr = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
xtr.DtdProcessing = DtdProcessing.Prohibit;
|
xtr.ProhibitDtd = true;
|
||||||
xtr.XmlResolver = null;
|
|
||||||
|
|
||||||
xtr.MoveToContent();
|
xtr.MoveToContent();
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
using (StringWriter sw = new StringWriter())
|
using (StringWriter sw = new StringWriter())
|
||||||
using (XmlTextWriter writer = new XmlTextWriter(sw))
|
using (XmlTextWriter writer = new XmlTextWriter(sw))
|
||||||
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
||||||
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }))
|
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true}))
|
||||||
{
|
{
|
||||||
TransformXml(reader, writer, sceneName, homeURL, userService, scopeID);
|
TransformXml(reader, writer, sceneName, homeURL, userService, scopeID);
|
||||||
|
|
||||||
|
|
|
@ -178,8 +178,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
|
|
||||||
using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData)))
|
using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData)))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
reader.ReadStartElement("LandData");
|
reader.ReadStartElement("LandData");
|
||||||
|
|
||||||
ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader);
|
ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader);
|
||||||
|
|
|
@ -63,8 +63,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
|
|
||||||
StringReader sr = new StringReader(serializedSettings);
|
StringReader sr = new StringReader(serializedSettings);
|
||||||
XmlTextReader xtr = new XmlTextReader(sr);
|
XmlTextReader xtr = new XmlTextReader(sr);
|
||||||
xtr.DtdProcessing = DtdProcessing.Prohibit;
|
xtr.ProhibitDtd = true;
|
||||||
xtr.XmlResolver = null;
|
|
||||||
|
|
||||||
xtr.ReadStartElement("RegionSettings");
|
xtr.ReadStartElement("RegionSettings");
|
||||||
|
|
||||||
|
|
|
@ -202,8 +202,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
|
|
||||||
using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization)))
|
using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization)))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
|
|
||||||
reader.ReadStartElement("InventoryItem");
|
reader.ReadStartElement("InventoryItem");
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
TRequest deserial;
|
TRequest deserial;
|
||||||
using (XmlTextReader xmlReader = new XmlTextReader(request))
|
using (XmlTextReader xmlReader = new XmlTextReader(request))
|
||||||
{
|
{
|
||||||
xmlReader.DtdProcessing = DtdProcessing.Prohibit;
|
xmlReader.ProhibitDtd = true;
|
||||||
xmlReader.XmlResolver = null;
|
|
||||||
|
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
|
XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
|
||||||
deserial = (TRequest) deserializer.Deserialize(xmlReader);
|
deserial = (TRequest) deserializer.Deserialize(xmlReader);
|
||||||
|
|
|
@ -210,8 +210,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
xmlReader.DtdProcessing = DtdProcessing.Prohibit;
|
xmlReader.ProhibitDtd = true;
|
||||||
xmlReader.XmlResolver = null;
|
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>));
|
XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>));
|
||||||
deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader);
|
deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader);
|
||||||
}
|
}
|
||||||
|
@ -271,8 +271,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
xmlReader.DtdProcessing = DtdProcessing.Prohibit;
|
xmlReader.ProhibitDtd = true;
|
||||||
xmlReader.XmlResolver = null;
|
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(TRequest));
|
XmlSerializer deserializer = new XmlSerializer(typeof(TRequest));
|
||||||
deserial = (TRequest)deserializer.Deserialize(xmlReader);
|
deserial = (TRequest)deserializer.Deserialize(xmlReader);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,8 +124,8 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
||||||
{
|
{
|
||||||
using(XmlTextReader sr = new XmlTextReader(s))
|
using(XmlTextReader sr = new XmlTextReader(s))
|
||||||
{
|
{
|
||||||
sr.DtdProcessing = DtdProcessing.Prohibit;
|
sr.ProhibitDtd = true;
|
||||||
sr.XmlResolver = null;
|
|
||||||
sr.ReadStartElement("BakedAppearance");
|
sr.ReadStartElement("BakedAppearance");
|
||||||
while(sr.LocalName == "BakedTexture")
|
while(sr.LocalName == "BakedTexture")
|
||||||
{
|
{
|
||||||
|
|
|
@ -1130,8 +1130,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
|
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
|
||||||
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
|
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
|
||||||
XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
|
XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
|
||||||
xtr.DtdProcessing = DtdProcessing.Prohibit;
|
xtr.ProhibitDtd = true;
|
||||||
xtr.XmlResolver = null;
|
|
||||||
|
|
||||||
// Loaded metadata will be empty if no information exists in the archive
|
// Loaded metadata will be empty if no information exists in the archive
|
||||||
dearchivedScenes.LoadedCreationDateTime = 0;
|
dearchivedScenes.LoadedCreationDateTime = 0;
|
||||||
|
|
|
@ -93,8 +93,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
StringReader sr = new StringReader(xml);
|
StringReader sr = new StringReader(xml);
|
||||||
XmlTextReader reader = new XmlTextReader(sr);
|
XmlTextReader reader = new XmlTextReader(sr);
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
|
|
||||||
reader.ReadStartElement("assets");
|
reader.ReadStartElement("assets");
|
||||||
reader.Read();
|
reader.Read();
|
||||||
|
|
|
@ -720,6 +720,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||||
string xml = SceneObjectSerializer.ToOriginalXmlFormat(so);
|
string xml = SceneObjectSerializer.ToOriginalXmlFormat(so);
|
||||||
|
|
||||||
XmlTextReader xtr = new XmlTextReader(new StringReader(xml));
|
XmlTextReader xtr = new XmlTextReader(new StringReader(xml));
|
||||||
|
xtr.ProhibitDtd = true;
|
||||||
|
|
||||||
xtr.ReadStartElement("SceneObjectGroup");
|
xtr.ReadStartElement("SceneObjectGroup");
|
||||||
xtr.ReadStartElement("RootPart");
|
xtr.ReadStartElement("RootPart");
|
||||||
xtr.ReadStartElement("SceneObjectPart");
|
xtr.ReadStartElement("SceneObjectPart");
|
||||||
|
@ -831,6 +833,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||||
string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options);
|
string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options);
|
||||||
|
|
||||||
XmlTextReader xtr = new XmlTextReader(new StringReader(xml2));
|
XmlTextReader xtr = new XmlTextReader(new StringReader(xml2));
|
||||||
|
xtr.ProhibitDtd = true;
|
||||||
|
|
||||||
xtr.ReadStartElement("SceneObjectGroup");
|
xtr.ReadStartElement("SceneObjectGroup");
|
||||||
xtr.ReadStartElement("SceneObjectPart");
|
xtr.ReadStartElement("SceneObjectPart");
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
|
|
||||||
using (XmlTextReader reader = new XmlTextReader(path))
|
using (XmlTextReader reader = new XmlTextReader(path))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
doc.XmlResolver = null;
|
doc.XmlResolver = null;
|
||||||
|
|
||||||
|
|
|
@ -593,8 +593,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
UTF8Encoding enc = new UTF8Encoding();
|
UTF8Encoding enc = new UTF8Encoding();
|
||||||
MemoryStream ms = new MemoryStream(enc.GetBytes(text));
|
MemoryStream ms = new MemoryStream(enc.GetBytes(text));
|
||||||
XmlTextReader xreader = new XmlTextReader(ms);
|
XmlTextReader xreader = new XmlTextReader(ms);
|
||||||
xreader.DtdProcessing = DtdProcessing.Prohibit;
|
xreader.ProhibitDtd = true;
|
||||||
xreader.XmlResolver = null;
|
|
||||||
|
|
||||||
SOPVehicle v = new SOPVehicle();
|
SOPVehicle v = new SOPVehicle();
|
||||||
bool error;
|
bool error;
|
||||||
|
|
|
@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
||||||
{
|
{
|
||||||
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }))
|
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true }))
|
||||||
{
|
{
|
||||||
reader.Read();
|
reader.Read();
|
||||||
bool isSingleObject = reader.Name != "CoalescedObject";
|
bool isSingleObject = reader.Name != "CoalescedObject";
|
||||||
|
|
|
@ -1943,7 +1943,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (!m_backingup)
|
if (!m_backingup)
|
||||||
{
|
{
|
||||||
WorkManager.RunInThreadPool(o => Backup(false), null, string.Format("BackupWorker ({0})", Name));
|
WorkManager.RunInThreadPool(o => Backup(false), null, string.Format("BackupWorker ({0})", Name, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,8 +133,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
{
|
{
|
||||||
using (XmlTextReader reader = new XmlTextReader(sr))
|
using (XmlTextReader reader = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
|
|
||||||
reader.MoveToContent(); // skip possible xml declaration
|
reader.MoveToContent(); // skip possible xml declaration
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData);
|
String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData);
|
||||||
using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null))
|
using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null))
|
||||||
{
|
{
|
||||||
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }))
|
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true }))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -272,8 +272,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
{
|
{
|
||||||
using(XmlTextReader reader = new XmlTextReader(sr))
|
using(XmlTextReader reader = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
|
|
||||||
sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader));
|
sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader));
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,8 +57,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
using(XmlTextReader reader = new XmlTextReader(fileName))
|
using(XmlTextReader reader = new XmlTextReader(fileName))
|
||||||
{
|
{
|
||||||
reader.WhitespaceHandling = WhitespaceHandling.None;
|
reader.WhitespaceHandling = WhitespaceHandling.None;
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
|
|
||||||
doc.Load(reader);
|
doc.Load(reader);
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,8 +200,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
using(XmlTextReader reader = new XmlTextReader(sr))
|
using(XmlTextReader reader = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
|
||||||
ReadXml(reader);
|
ReadXml(reader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1148,8 +1148,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
using (Stream s = rsp.GetResponseStream())
|
using (Stream s = rsp.GetResponseStream())
|
||||||
using (XmlTextReader rdr = new XmlTextReader(s))
|
using (XmlTextReader rdr = new XmlTextReader(s))
|
||||||
{
|
{
|
||||||
rdr.DtdProcessing = DtdProcessing.Prohibit;
|
rdr.ProhibitDtd = true;
|
||||||
rdr.XmlResolver = null;
|
|
||||||
doc.Load(rdr);
|
doc.Load(rdr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue