~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to debian/patches/163_cgi.rb_quote_boundary.patch

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- ruby-1.8.5/lib/cgi.rb       23 Sep 2006 12:47:11 -0000      1.68.2.18
2
 
+++ ruby-1.8.5/lib/cgi.rb       3 Dec 2006 23:35:45 -0000       1.68.2.19
3
 
@@ -967,6 +967,7 @@
4
 
     def read_multipart(boundary, content_length)
5
 
       params = Hash.new([])
6
 
       boundary = "--" + boundary
7
 
+      quoted_boundary = Regexp.quote(boundary, "n")
8
 
       buf = ""
9
 
       bufsize = 10 * 1024
10
 
       boundary_end=""
11
 
@@ -998,7 +999,7 @@
12
 
         end
13
 
         body.binmode if defined? body.binmode
14
 
 
15
 
-        until head and /#{boundary}(?:#{EOL}|--)/n.match(buf)
16
 
+        until head and /#{quoted_boundary}(?:#{EOL}|--)/n.match(buf)
17
 
 
18
 
           if (not head) and /#{EOL}#{EOL}/n.match(buf)
19
 
             buf = buf.sub(/\A((?:.|\n)*?#{EOL})#{EOL}/n) do
20
 
@@ -1025,7 +1026,7 @@
21
 
           content_length -= c.size
22
 
         end
23
 
 
24
 
-        buf = buf.sub(/\A((?:.|\n)*?)(?:[\r\n]{1,2})?#{boundary}([\r\n]{1,2}|--)/n) do
25
 
+        buf = buf.sub(/\A((?:.|\n)*?)(?:[\r\n]{1,2})?#{quoted_boundary}([\r\n]{1,2}|--)/n) do
26
 
           body.print $1
27
 
           if "--" == $2
28
 
             content_length = -1