[banshee] RssParser: Don't resolve external references (bgo#601554)



commit 1ae49caab85581219ebf9c23de47da23417542ba
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sun Sep 4 15:04:37 2011 +0200

    RssParser: Don't resolve external references (bgo#601554)
    
    If we were given the URL of an HTML page instead of a proper RSS feed,
    XmlDocument would then try to resolve the references to the HTML DTD,
    resulting in HTTP queries to w3c.org. Setting the XmlResolver to null
    prevents that from happening.

 src/Libraries/Migo/Migo.Syndication/RssParser.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Libraries/Migo/Migo.Syndication/RssParser.cs b/src/Libraries/Migo/Migo.Syndication/RssParser.cs
index 8bbff2b..994042d 100644
--- a/src/Libraries/Migo/Migo.Syndication/RssParser.cs
+++ b/src/Libraries/Migo/Migo.Syndication/RssParser.cs
@@ -48,6 +48,9 @@ namespace Migo.Syndication
             this.url = url;
             xml = xml.TrimStart ();
             doc = new XmlDocument ();
+            // Don't resolve any external references, see bgo#601554
+            doc.XmlResolver = null;
+            
             try {
                 doc.LoadXml (xml);
             } catch (XmlException e) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]