develooper Front page | perl.libwww | Postings from October 2011

Re: HTML::Form bug

Thread Previous | Thread Next
From:
Gisle Aas
Date:
October 14, 2011 23:16
Subject:
Re: HTML::Form bug
Message ID:
B3F55A31-24FB-4B3E-B4F2-7D8C9510A23F@activestate.com
On Oct 15, 2011, at 0:03 , Rob Dixon wrote:

> Method HTML::Form::FileInput::form_name_value has been changed so that
> there is now a separate 'filename' field in the object. There is also
> code, marked as legacy, handling the old way of doing things.
> Unfortunately is is broken, and the problem has arisen from a query
> regarding WWW::Mechanize which still uses this old method.
> 
> At the start, $filename is copied from the {filename} field of the
> object, or from {value} if that field is empty. Later on in the legacy
> code, line 1509, $fn is copied to $filename only if it is currently
> undefined. Because the 'filename' method has defaulted it to the same
> value as $file it will never be undefined at this point, and can be an
> array reference if the old call method is used, giving actual an actual
> value in the HTTP::Request of something like "ARRAY(0x9567570)".
> 
> All that seems to be necessary to fix the problem is to remove the line
> 
>  $old = $self->file unless defined $old;
> 
> from the 'filename' method.

Hi Rob,

Are you able to modifiy the test suite to demonstrate under what conditions
this bug occur?

--Gisle


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About