Subject: | bug in CGI::Enurl when '=' in key |
Date: | Tue, 22 Sep 2009 16:00:19 +0200 |
To: | "bug-CGI-Enurl [...] rt.cpan.org" <bug-CGI-Enurl [...] rt.cpan.org> |
From: | "Mehring, Christian" <christian.mehring [...] siemens.com> |
Hi,
I've found a bug in CGI::Enurl. It will not decode character '=' in key as well as in value. But in key it's necessary. Otherwise the key will be cut.
see example below or attached:
=================================================================================
use strict;
use warnings;
#$CGI::Enurl::KeepUnencoded = 'a-zA-Z 0-9_\\-@.'; # workaroud if removed
use CGI::Enurl;
use CGI::Deurl qw(NOTCGI);
use Data::Dumper;
my %query;
# = must be encoded in key
print enurl({'fname=5' => 'Jan'}), "\n";
deurl('fname=5=Jan',\%query);
print Dumper \%query;
%query = ();
deurl('fname%3D5=Jan',\%query);
print Dumper \%query;
=output
fname=5=Jan
$VAR1 = {
'fname' => '5=Jan'
};
$VAR1 = {
'fname=5' => 'Jan'
};
=cut
================================================================================
Pakckage:CGI-Enurl-1.07
Perl: v5.8.8 built for MSWin32-x86-multi-thread
System: Microsoft Windows XP Professional Version 2002 Service Pack 3
With best regards,
Christian Mehring
Siemens AG
Siemens IT Solutions and Services
Global Operations
SIS GO CS ITO C&P 1
Werner-von-Siemens-Str. 60
91052 Erlangen, Germany
Tel.: +49 (9131) 920-3281
Fax: +49 (9131) 7-43303
mailto:christian.mehring@siemens.com
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Barbara Kux, Hermann Requardt, Siegfried Russwurm, Peter Y. Solmssen; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322
Important notice: This e-mail and any attachment thereof contain corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank you.
Message body is not shown because sender requested not to inline it.