Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-Authentication CPAN distribution.

Report information
The Basics
Id: 20695
Status: resolved
Priority: 0/
Queue: CGI-Application-Plugin-Authentication

People
Owner: Nobody in particular
Requestors: polettix [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.10
Fixed in: (no value)



Subject: Cookie expiration bug
In CAPA::Store::Cookie, there's a typo regarding the expiration of the cookie that prevents the cookie to survive the "session bound" and requires the user to always log on. When building the parameter list for CGI::Cookie::new, in %cookie_params the '-expiry' key is used, but CGI::Cookie::new wants '-expires' (at least on version 1.27, which is the latest). I've attached the tiny patch to eliminate the bug, hope it helps.
Subject: Cookie.pm.diff
--- Cookie.pm 2006-07-26 16:24:05.234701872 +0200 +++ patched/Cookie.pm 2006-07-26 16:24:36.622930136 +0200 @@ -210,7 +210,7 @@ -name => $store->cookie_name, -value => $rawdata, ); - $cookie_params{'-expiry'} = $store->{cookie}->{options}->{EXPIRY} if $store->{cookie}->{options}->{EXPIRY}; + $cookie_params{'-expires'} = $store->{cookie}->{options}->{EXPIRY} if $store->{cookie}->{options}->{EXPIRY}; my $cookie = new CGI::Cookie(%cookie_params); $self->header_add(-cookie => [$cookie]); return;
Thanks for the patch. This has been accepted and applied to version 0.11. Cheers, Cees Hek