diff options
| author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-10 22:47:19 +0000 |
|---|---|---|
| committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-10 22:47:19 +0000 |
| commit | d404dc35d3e2e029b9173743b59fa78267448af8 (patch) | |
| tree | 929a81c556987a1da665aa704b23d4898ca00b12 /lib/cgi.rb | |
| parent | a9cb5734bb8d3697e454bce3426763c7afeee80f (diff) | |
| download | ruby-d404dc35d3e2e029b9173743b59fa78267448af8.tar.gz ruby-d404dc35d3e2e029b9173743b59fa78267448af8.tar.xz ruby-d404dc35d3e2e029b9173743b59fa78267448af8.zip | |
* lib/cgi.rb (CGI::QueryExtension::read_multipart): Properly parse
a quoted-string in a Content-Disposition value.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi.rb')
| -rw-r--r-- | lib/cgi.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb index 38407da5c..94d92e25a 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -1037,8 +1037,8 @@ class CGI body.rewind - /Content-Disposition:.* filename="?([^\";]*)"?/ni.match(head) - filename = ($1 or "") + /Content-Disposition:.* filename=(?:"((?:\\.|[^\"])*)"|([^;]*))/ni.match(head) + filename = ($1 or $2 or "") if /Mac/ni.match(env_table['HTTP_USER_AGENT']) and /Mozilla/ni.match(env_table['HTTP_USER_AGENT']) and (not /MSIE/ni.match(env_table['HTTP_USER_AGENT'])) |
