Date: | Thu, 11 Sep 2003 01:46:26 +0100 |
From: | Paul Makepeace <Paul.Makepeace [...] realprogrammers.com> |
To: | Tony Bowden <kasei [...] tmtm.com> |
Subject: | Re: CGI::Untaint + Apache::Request |
Tony -
I've noticed something quite bizarre (to me). With,
my $form = Apache::Request->instance($r, DISABLE_UPLOADS => 1)->parms;
my $h = CGI::Untaint->new({ INCLUDE_PATH => 'Corrobbo' }, $form);
On 5.8.0/mod_perl this seems to have the effect that any assignments
into $vals become immediately stringified (and thus useless):
In new(), $vals =
bless( {
'p' => '',
'projecttype' => 'brief',
'action' => 'submit',
'__config' => 'HASH(0x8ac7144)'
}, 'CGI::Untaint' );
Either doing,
{ %$form }
or, in C::U,
ref $_[0] eq "HASH" ? ($config, $vals) = ($_[0], {%{$_[1]}}) : $vals = {@_};
solves it. Presumably since you said you've been using apr->parms too
you haven't seen this? I'm not sure if this is Apache::Table or
something odder.
Paul
--
Paul Makepeace ....................................... http://paulm.com/
"If chocolate had no calories, then the fields will turn green in the
Spring."
-- http://paulm.com/toys/surrealism/