]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2005-07-16 18:49:31 by don]
authordon <>
Sun, 17 Jul 2005 01:49:31 +0000 (17:49 -0800)
committerdon <>
Sun, 17 Jul 2005 01:49:31 +0000 (17:49 -0800)
* Use uri_escape to escape URI's before sending them back out so the name
   of the file doesn't munge the query string. (URI handling really needs to
   be improved, but this will work for starters.) [#301606 part 1]

 * call decode_rfc1522 on the filename returned so that encoded filenames
   get decoded to something "reasonable." [#301606 part 2]

 * We now require URI::Escape

cgi/bugreport.cgi
cgi/common.pl
debian/control

index 28035e21624dbf3d1cef4b1b145296d44067c2bc..f46cad8cc051da760ceee1b1851617cee8d66041 100755 (executable)
@@ -68,6 +68,7 @@ sub display_entity ($$$$\$\@) {
     my $type = $entity->effective_type;
     my $filename = $entity->head->recommended_filename;
     $filename = '' unless defined $filename;
+    $filename = decode_rfc1522($filename);
 
     if ($top) {
        $$this .= htmlsanit(decode_rfc1522($entity->stringify_header))
index db9d1f4dd7ee096a9927ca5bdc5b69bbf52b0a02..74da3c45b571807a38fee568f5b222fdecf9cc21 100644 (file)
@@ -6,6 +6,8 @@ use Mail::Address;
 use MLDBM qw/DB_File/;
 use POSIX qw/ceil/;
 
+use URI::Escape;
+
 $config_path = '/etc/debbugs';
 $lib_path = '/usr/lib/debbugs';
 require "$lib_path/errorlib";
@@ -463,7 +465,7 @@ sub dlurl {
     }
     $params .= "&archive=yes" if ($common_archive);
     my $pathinfo = '';
-    $pathinfo = "/$filename" if $filename ne '';
+    $pathinfo = '/'.uri_escape($filename) if $filename ne '';
 
     return urlsanit("bugreport.cgi$pathinfo?$params");
 }
index 18db7b572a5071ad250eebf4f5970c4593aac77f..13522ba672d23b11d786f0beb9fefac3ec9bad6c 100644 (file)
@@ -8,7 +8,7 @@ Build-Depends-Indep: debhelper
 
 Package: debbugs
 Architecture: all
-Depends: perl5 | perl, exim | mail-transport-agent, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, libunicode-maputf8-perl
+Depends: perl5 | perl, exim | mail-transport-agent, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, libunicode-maputf8-perl, liburi-perl
 Recommends: httpd, links | lynx
 Suggests: spamassassin
 Description: The bug tracking system based on the active Debian BTS