rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Paul Rogers <pmr16366@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: bug report and unit test for infinite loop parsing Content-Disposion header
Date: Fri, 4 May 2012 14:37:44 -0700 (PDT)	[thread overview]
Message-ID: <884fbcae-4fc2-4b4e-921e-2555550abf54@n5g2000pbg.googlegroups.com> (raw)

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

             reply	other threads:[~2012-05-04 21:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 21:37 Paul Rogers [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=884fbcae-4fc2-4b4e-921e-2555550abf54@n5g2000pbg.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).