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;