Skip to content

Commit d152510

Browse files
authored
Merge pull request BlogEngine#206 from irbishop/CVE-2019-10718
Patch to prevent XXE on pingback.axd and metaweblog.axd
2 parents 612164e + 3c61785 commit d152510

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

BlogEngine/BlogEngine.Core/API/MetaWeblog/XMLRPCRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ private static MWAPost GetPost(XmlNode node)
327327
/// </param>
328328
private void LoadXmlRequest(string xml)
329329
{
330-
var request = new XmlDocument();
330+
var request = new XmlDocument() { XmlResolver = null };
331331
try
332332
{
333333
if (!(xml.StartsWith("<?xml") || xml.StartsWith("<method")))
@@ -505,4 +505,4 @@ private static string ParseRequest(HttpContext context)
505505

506506
#endregion
507507
}
508-
}
508+
}

BlogEngine/BlogEngine.Core/Web/HttpHandlers/PingbackHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ private static XmlDocument RetrieveXmlDocument(HttpContext context)
337337
context.Response.End();
338338
}
339339

340-
var doc = new XmlDocument();
340+
var doc = new XmlDocument() { XmlResolver = null };
341341
doc.LoadXml(xml);
342342
return doc;
343343
}
@@ -432,4 +432,4 @@ private void ExamineSourcePage(string sourceUrl, string targetUrl)
432432

433433
#endregion
434434
}
435-
}
435+
}

0 commit comments

Comments
 (0)