Jonathan Vanasco <[EMAIL PROTECTED]> writes:
> BUT it brings up this issue - a corrupt cookie of this sort seems to call a
> die() in modperl once libapreq attempts to parse it. i'd say 50% of
> the dies are met with a segfault. i don't know why its not a 1:1 ratio.
It's supposed to die, but it's obviously not supposed to segfault.
Have you tried putting a "use APR::Request::Error" in the offending
script, to see if that impacts on the segfaults?
>> I couldn't seem to find any way to provide a defense against this. Just
> calling cookiejar->cookie() will cause the error.
> my $cookiejar = Apache2::Cookie::Jar->new( $self->{'apr'} );
> my @names = $cookiejar->cookies();
>
> the segfault, natually, occurs whether or not the code is wrapped in an eval
> block. an eval block didn't seem to catch the other error either
> (sorry, but i can't discern what it is)
use APR::Request::Error;
my $req = APR::Request::Apache2->new($r);
eval {
my $jar = $req->jar; #table of cookies
...
};
if (ref $@ and [EMAIL PROTECTED]>isa("APR::Request::Error") ) {
my $jar = [EMAIL PROTECTED]>jar; # table of successfully parsed cookies
...
}
> 'Cookie' =>
> 'wordpressuser_c580712eb86cad2660b3601ac04202b2=admin;
> wordpresspass_c580712eb86cad2660b3601ac04202b2=7ebeeed42ef50720940f5b8db
> 2f9db49; rs_session=59ae9b8b503e3af7d17b97e7f77f7ea5; dbx-
> postmeta=grabit=0-,1-,2-,3-,4-,5-,6-&advancedstuff=0-,1+,2-',
I don't see anything fundamentally wrong with that header.
Will do some testing tho.
--
Joe Schaefer