rometools / rome

Java library for RSS and Atom feeds
https://rometools.github.io/rome
Apache License 2.0
906 stars 168 forks source link

Broken RSS feed sends XML parser off on infinite loop #142

Closed PatrickGotthard closed 11 years ago

PatrickGotthard commented 11 years ago
=== This issue was migrated from JIRA ===
Type: Bug
Priority: Critical
Status: Open
Resolution: UNRESOLVED
Reported by: bfancher
Assigned to: ROME Jira Lead
Created: Thu Mar 04 18:15:01 CET 2010
Updated: Thu Mar 04 18:15:01 CET 2010
Resolved: Thu Mar 04 18:15:01 CET 2010
Version: current
Fix version: milestone 1
JIRA Link: https://rometools.jira.com/browse/ROME-141
=========================================

Fetch a broken XML feed causes ROME to never return. Generating stack traces always shows it stuck somewhere trying to parse the XML feed. For example:

<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
    xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <atom:link rel="self"
            href="http://breakthrough.columbiafoursquare.com/podcasts/podcast.xml"
            type="application/rss+xml" />
        <lastBuildDate>Thu, 18 Feb 2010 17:29:15 -0800</lastBuildDate>
        <title>Breakthrough</title>
        <itunes:author>Breakthrough Youth Church</itunes:author>
        <link>http://breakthrough.columbiafoursquare.com</link>
        <generator>Podcast Maker v1.3.8b -
            http://www.lemonzdream.com/podcastmaker</generator>
        <description />
        <itunes:subtitle />
        <itunes:summary />
        <language>en</language>
        <copyright />
        <image>
            <url>http://breakthrough.columbiafoursquare.com/podcasts/breakthrough_%20logo%20copy_144.jpg</url>
            <title>Breakthrough</title>
            <link>http://breakthrough.columbiafoursquare.com</link>
            <width>144</width>
            <height>108</height>
        </image>
        <itunes:image
            href="http://breakthrough.columbiafoursquare.com/podcasts/breakthrough_%20logo%20copy.jpg" />
        <category>Christianity</category>
        <itunes:category text="Religion & Spirituality">
            <itunes:category text="Christianity" />
        </itunes:category>
        <itunes:keywords />
        <itunes:explicit>no</itunes:explicit>
        <item>
            <title>The Above and Beyond God! </title>
            <itunes:author>Breakthrough Youth Church</itunes:author>
            <description><![CDATA[Audra Thurman || Sermon]
PatrickGotthard commented 11 years ago

I've tested your example with the latest (sourcecode) version and it works as expected (throws an Exception).