rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* bug report and unit test for infinite loop parsing Content-Disposion header
@ 2012-05-04 21:37 Paul Rogers
  2012-05-04 23:34 ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Rogers @ 2012-05-04 21:37 UTC (permalink / raw)
  To: Rack Development

Hi,

I created this

git@github.com:paulrogers/rack.git

showing a test that seems to have an infinite loop issue when parsing
a multipart form.

you can run the test using

bacon -I./lib:./test -a -t 'Rack::Multipart'

What seems to happen is that when parsing a header like this

Content-Disposition: inline; name=xml_product_config;
filename=XML_PRODUCT_CONFIG.xml

the regexp in the get_filename method in parser.rb seems to get stuck
in an infinite loop on   the line with

if head =~ RFC2183

This happens in the tests as well as in the unit test in the attached
git commit ( is that the correct term?)

Id be grateful if some one can take a look.

Thanks,,
Paul

^ permalink raw reply	[flat|nested] 5+ messages in thread
* bug report and unit test for infinite loop parsing Content-Disposion header
@ 2012-05-04 21:37 Paul Rogers
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Rogers @ 2012-05-04 21:37 UTC (permalink / raw)
  To: Rack Development

Hi,

I created this

git@github.com:paulrogers/rack.git

showing a test that seems to have an infinite loop issue when parsing
a multipart form.

you can run the test using

bacon -I./lib:./test -a -t 'Rack::Multipart'

What seems to happen is that when parsing a header like this

Content-Disposition: inline; name=xml_product_config;
filename=XML_PRODUCT_CONFIG.xml

the regexp in the get_filename method in parser.rb seems to get stuck
in an infinite loop on   the line with

if head =~ RFC2183

This happens in the tests as well as in the unit test in the attached
git commit ( is that the correct term?)

Id be grateful if some one can take a look.

Thanks,,
Paul

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-07 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-04 21:37 bug report and unit test for infinite loop parsing Content-Disposion header Paul Rogers
2012-05-04 23:34 ` Eric Wong
2012-05-07  0:39   ` Lawrence Pit
2012-05-07 15:04     ` Paul Rogers
  -- strict thread matches above, loose matches on Subject: below --
2012-05-04 21:37 Paul Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).