You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ted <mp...@netcasters.com> on 2005/08/24 23:40:24 UTC

Apache2::Cookie blank value bug?

Blank value in cookie causes server to die with a Segmentation Fault.

my $value = '';
my $cookie = Apache2::Cookie->new($r,
                -name => 'test_cookie',
                -value => $value,
                -path => '/',
              );
$cookie->bake($r)



Re: Apache2::Cookie blank value bug?

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Philip M. Gollucci wrote:
> Ted wrote:
> 
>>>> Blank value in cookie causes server to die with a Segmentation Fault.
>>>>
>>>> my $value = '';
>>>> my $cookie = Apache2::Cookie->new($r,
>>>>                -name => 'test_cookie',
>>>>                -value => $value,
>>>>                -path => '/',
>>>>              );
>>>> $cookie->bake($r)
> 
>  > Apache/2.0.54
>  > mod_perl 2.01
>  > libapreq2-2.06-dev
>  > Solaris 9
> 
> Try the APR::Request::Cookie API.  I distinctly remember this being 
> fixed as part of 2.06-dev when we fixed the blank param value causing a 
> seg fault.
> I may or may not have time to check this out tonight, before VACATION. :)
I just saw joes commit a fix for this in the current SVN head on apreq-cvs.
Try an SVN build.



-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com

Re: Apache2::Cookie blank value bug?

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Ted wrote:
>>> Blank value in cookie causes server to die with a Segmentation Fault.
>>>
>>> my $value = '';
>>> my $cookie = Apache2::Cookie->new($r,
>>>                -name => 'test_cookie',
>>>                -value => $value,
>>>                -path => '/',
>>>              );
>>> $cookie->bake($r)
 > Apache/2.0.54
 > mod_perl 2.01
 > libapreq2-2.06-dev
 > Solaris 9

Try the APR::Request::Cookie API.  I distinctly remember this being fixed as 
part of 2.06-dev when we fixed the blank param value causing a seg fault.
I may or may not have time to check this out tonight, before VACATION. :)




-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com

Re: Apache2::Cookie blank value bug?

Posted by Ted <mp...@netcasters.com>.
Sorry if I posted to the wrong list, but to answer your question.

Apache/2.0.54
mod_perl 2.01
libapreq2-2.06-dev
Solaris 9

Jonathan Vanasco wrote:

>
> Which versions of :
>
>     Apache
>     mod_perl
>     libapreq2
>
> ?
>
> also, what os
>
> this might be better suited to the libapreq list - but that info is  
> kinda needed
>
>
> On Aug 24, 2005, at 5:40 PM, Ted wrote:
>
>> Blank value in cookie causes server to die with a Segmentation Fault.
>>
>> my $value = '';
>> my $cookie = Apache2::Cookie->new($r,
>>                -name => 'test_cookie',
>>                -value => $value,
>>                -path => '/',
>>              );
>> $cookie->bake($r)
>>
>>
>>
>
>
>

Re: Apache2::Cookie blank value bug?

Posted by Jonathan Vanasco <jv...@mastersofbranding.com>.
Which versions of :

     Apache
     mod_perl
     libapreq2

?

also, what os

this might be better suited to the libapreq list - but that info is  
kinda needed


On Aug 24, 2005, at 5:40 PM, Ted wrote:

> Blank value in cookie causes server to die with a Segmentation Fault.
>
> my $value = '';
> my $cookie = Apache2::Cookie->new($r,
>                -name => 'test_cookie',
>                -value => $value,
>                -path => '/',
>              );
> $cookie->bake($r)
>
>
>


Re: Apache2::Cookie blank value bug?

Posted by John ORourke <jo...@versatilia.com>.
No solution but a work-around is to set the value to something and set 
-expires=>0, which should delete the cookie from the browser.

Blank values are contrary to the RFC anyway so you probably shouldn't be 
trying to use them.

cheers
John


Ted wrote:

> Blank value in cookie causes server to die with a Segmentation Fault.
>
> my $value = '';
> my $cookie = Apache2::Cookie->new($r,
>                -name => 'test_cookie',
>                -value => $value,
>                -path => '/',
>              );
> $cookie->bake($r)
>
>
>


Re: Apache2::Cookie blank value bug?

Posted by Dan Brian <da...@brians.org>.
On Aug 24, 2005, at 3:40 PM, Ted wrote:

> Blank value in cookie causes server to die with a Segmentation Fault.

For me, too.