[Bug 785338] Re: sub url from perl cgi library fails on special characters

lawrenqj lquigley at athenium.com
Fri Apr 15 14:09:27 UTC 2016


This effects trusty as well.

ii  perl-modules                         5.18.2-2ubuntu1.1
all          Core Perl modules

** Changed in: perl (Ubuntu)
       Status: Invalid => New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to perl in Ubuntu.
https://bugs.launchpad.net/bugs/785338

Title:
  sub url from perl cgi library fails on special characters

Status in perl package in Ubuntu:
  New

Bug description:
  Binary package hint: perl

  hardy: ii  perl                                        5.8.8-12ubuntu0.4                     Larry Wall's Practical Extraction and Report
  lucid:  ii  perl                            5.10.1-8ubuntu2.1                 Larry Wall's Practical Extraction and Report

  
  Between Hardy and Lucid, CGI.pm has a change that breaks "sub url" when both the request_uri and the target contains special characters:

  root at cricket:/usr/share/perl/5.10.1# diff CGI.pm.orig CGI.pm
  2740c2740
  <     my $request_uri =  unescape($self->request_uri) || '';
  ---
  >     my $request_uri =  $self->request_uri || '';

  If you pass in a target with a special character (in my case a +) and
  your $request_uri includes that character the outputed url includes an
  http escaped version of the $request_uri followed by the target url:

  
  #run from /home/one+two
  $cgi = new CGI;
  $cgi->path_info('/home/one+two/link');
  print $cgi->url(-relative=>1,
                       -query=>1,
                       -path_info=>1);
  #output: /home/one%20two/home/one+two/link

  
  I'm not sure why this change was made, so I don't know what other side effect it will have, but it breaks all URLs that contain special characters, so it should be removed.

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: perl 5.10.1-8ubuntu2.1
  ProcVersionSignature: Ubuntu 2.6.32-30.59-generic 2.6.32.29+drm33.13
  Uname: Linux 2.6.32-30-generic x86_64
  NonfreeKernelModules: fglrx
  Architecture: amd64
  Date: Thu May 19 13:36:25 2011
  LiveMediaBuild: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.utf8
   SHELL=/bin/bash
  SourcePackage: perl

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/perl/+bug/785338/+subscriptions



More information about the foundations-bugs mailing list