Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent XXE (3x) #1229

Merged
merged 3 commits into from
Nov 13, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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