severity 483144 normal
tag 483144 patch fixed-upstream
thanks
On Tue, May 27, 2008 at 03:21:10PM +0200, Markus Broeker wrote:
> Package: perl-modules
> Version: 5.10.0-10
> Severity: grave
>
> An upstream typo in the CGI-cpan module 3.29 prevents scripts, which use
> CGI::upload, from uploading files.
Thanks for the report. The severity is overrated, this certainly doesn't
make perl-modules unusable. Downgrading.
The problem is that the filehandle accidentally gets stringified in
UTF-8 decoding. Patch attached, this was fixed in CGI.pm-3.30 or 3.31.
--
Niko Tyni [EMAIL PROTECTED]
--- CGI.pm 2008/05/28 06:00:15 1.1
+++ CGI.pm 2008/05/28 06:01:04
@@ -449,8 +449,8 @@
my $utf8 = $charset eq 'utf-8';
if ($utf8) {
eval "require Encode; 1;" if $utf8 && !Encode->can('decode'); # bring in these functions
- return wantarray ? map {Encode::decode(utf8=>$_) } @{$self->{$name}}
- : Encode::decode(utf8=>$self->{$name}->[0]);
+ my @result = map {ref($_) ? $_ : Encode::decode(utf8=>$_) } @{$self->{$name}};
+ return wantarray ? @result: $result[0];
} else {
return wantarray ? @{$self->{$name}} : $self->{$name}->[0];
}