Subject: | Fails to handle multiple files |
System Info: CentOS3 server, fully updated
Perl: 5.8.5 from CentOS3 RPMs
CGI::Upload version 1.10
CGI::Upload returns incorrect information when used with more than one
uploaded file. The cache check is not looking to see if a particular
upload field exists in the cache, just that the cache itself exists.
See attached file for patch verified to fix this bug.
Subject: | CGI-Upload-cache-patch.txt |
--- Upload.pm-original 2004-06-16 00:19:27.000000000 -0400
+++ Upload.pm 2006-02-17 13:56:36.000000000 -0500
@@ -43,7 +43,7 @@
# returns a hash of all information determined about the uploaded file
# which is be cached for subsequent requests.
- $self->{'_CACHE'}->{$param} = $self->_handle_file( $param ) unless exists $self->{'_CACHE'};
+ $self->{'_CACHE'}->{$param} = $self->_handle_file( $param ) unless exists $self->{'_CACHE'}->{$param};
# Return the requested property of the uploaded file