Bug#769240: libcatalyst-controller-formbuilder-perl: FTBFS in jessie/i386: Tests failures
Simon McVittie
smcv at debian.org
Wed Nov 12 19:50:02 UTC 2014
On 12/11/14 19:24, gregor herrmann wrote:
> On Wed, 12 Nov 2014 11:28:52 +0100, Lucas Nussbaum wrote:
>>> # Testing Catalyst::Controller::FormBuilder 0.06
>>> t/00-load.t ........ ok
>>> [error] Caught exception in TestApp::Controller::Books->basic "Can't locate object method "param_fetch" via package "Catalyst::Request" at /usr/share/perl5/CGI/FormBuilder/Field.pm line 192."
>>> [error] Caught exception in TestApp::Component::Rendered->process "Can't call method "render" on an undefined value at /«PKGBUILDDIR»/t/lib/TestApp/Component/Rendered.pm line 9."
>
> I guess this is caused by the recent changes in
> libcgi-formbuilder-perl, esp. by 5742e58 (adjustments for CGI.pm >=
> 4.05)
The first error, certainly: real CGI.pm objects have "always"[1] had the
param_fetch method, but CGI::FormBuilder would previously tolerate being
given a CGI-like object with only the param method.
I would personally suggest adding the param_fetch method to whatever
object is pretending to be a CGI object (Catalyst::Request?), since the
context-sensitive CGI::param method seems like a security vulnerability
waiting to happen. Bugzilla was unlucky and IkiWiki was lucky, but it
could easily have been the other way round.
Alternatively, CGI::FormBuilder could be augmented to use something like
this
my @xs;
if ($q->can("param_fetch")) {
@xs = @{$q->param_fetch('x')};
} else {
@xs = $q->param('x');
}
at each of the locations where Amitai and I patched it. :-(
S
[1] since at least 2000, at which point I stopped researching
More information about the pkg-perl-maintainers
mailing list