Skip to content

Commit

Permalink
Prevent XXE (3x) (neo-project#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon authored and Tommo-L committed Jun 22, 2020
1 parent a3bd55f commit a1c2aef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neo/Network/UPnP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private static string GetServiceUrl(string resp)
{
try
{
XmlDocument desc = new XmlDocument();
XmlDocument desc = new XmlDocument() { XmlResolver = null };
HttpWebRequest request = WebRequest.CreateHttp(resp);
using (WebResponse response = request.GetResponse())
{
Expand Down Expand Up @@ -155,7 +155,7 @@ private static XmlDocument SOAPRequest(string url, string soap, string function)
using (Stream reqs = r.GetRequestStream())
{
reqs.Write(b, 0, b.Length);
XmlDocument resp = new XmlDocument();
XmlDocument resp = new XmlDocument() { XmlResolver = null };
WebResponse wres = r.GetResponse();
using (Stream ress = wres.GetResponseStream())
{
Expand Down

0 comments on commit a1c2aef

Please sign in to comment.