]> git.deb.at Git - deb/packages.git/commitdiff
Packages::Dispatcher: Handle escaped characters in PATH_INFO correctly
authorFrank Lichtenheld <frank@lichtenheld.org>
Sun, 2 Sep 2007 21:48:17 +0000 (21:48 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sun, 2 Sep 2007 22:01:05 +0000 (22:01 +0000)
Unescape stuff from PATH_INFO before setting CGI parameters to it.
Fixes URLs of the form http://packages.debian.org/g++

lib/Packages/Dispatcher.pm

index 7973d0d93385771160265dee54d6b77c8577c932..64790c137041b743f387bdd4ab4a46ad9100b64c 100755 (executable)
@@ -226,8 +226,9 @@ sub do_dispatch {
        } # else if (@components == 1)
 
        if (@components) {
-           $input->param( 'keywords', $components[0] );
-           $input->param( 'package', $components[0] );
+           my $c = uri_unescape($components[0]);
+           $input->param( 'keywords', $c );
+           $input->param( 'package', $c );
        }
     }