libo26 / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

Hang during CSS sanitizing #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Parse the attached craigslist.xml
2.
3.

What is the expected output? What do you see instead?

I expected it to parse.  Instead it hangs. There's a bizarre spam-inflected
CSS chunk which causes the CSS sanitizing regex to backtrack pathologically.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Attached is a patch which fixes the problem.

Original issue reported on code.google.com by tabblo.e...@gmail.com on 18 Nov 2008 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
I ended up fixing a similar issue myself with a smaller change to the regular
expression.  I just added \s* to the end of the CSS.  It looks like any CSS with
trailing whitespace will cause it to take a long time before getting kicked 
out. 
Adding this changes the code path -- it will now try to fix individual items 
instead
of stopping early.

Any ideas on which solution is the better one?

Original comment by EpsilonP...@hotmail.com on 8 Jul 2009 at 7:39

GoogleCodeExporter commented 9 years ago
also see issue #169 and issue #145

Original comment by melk...@gmail.com on 1 Sep 2009 at 3:49

GoogleCodeExporter commented 9 years ago
Issue 169 has been merged into this issue.

Original comment by adewale on 27 Feb 2010 at 3:08

GoogleCodeExporter commented 9 years ago
Issue 205 has been merged into this issue.

Original comment by adewale on 27 Feb 2010 at 3:10

GoogleCodeExporter commented 9 years ago
Issue 15 has been merged into this issue.

Original comment by adewale on 27 Feb 2010 at 3:12

GoogleCodeExporter commented 9 years ago
Issue 145 has been merged into this issue.

Original comment by adewale on 27 Feb 2010 at 3:13

GoogleCodeExporter commented 9 years ago
Issue 147 has been merged into this issue.

Original comment by adewale on 27 Feb 2010 at 3:19

GoogleCodeExporter commented 9 years ago
The patch from tabblo.exceptions is significantly faster on larger feeds.

I have applied that patch in revision 308: 
http://code.google.com/p/feedparser/source/detail?r=308

Original comment by adewale on 27 Feb 2010 at 4:08

GoogleCodeExporter commented 9 years ago
Issue 209 has been merged into this issue.

Original comment by adewale on 3 Mar 2010 at 10:17

GoogleCodeExporter commented 9 years ago
Issue 8 has been merged into this issue.

Original comment by adewale on 1 Dec 2010 at 1:23

GoogleCodeExporter commented 9 years ago
Issue 236 has been merged into this issue.

Original comment by adewale on 4 Dec 2010 at 10:32