Skip Menu |

This queue is for tickets about the Maypole-Plugin-Authentication-UserSessionCookie CPAN distribution.

Report information
The Basics
Id: 14491
Status: resolved
Priority: 0/
Queue: Maypole-Plugin-Authentication-UserSessionCookie

People
Owner: Nobody in particular
Requestors: dave [...] riverside-cms.co.uk
Cc:
AdminCc:

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



Subject: Logout behaviour differs from docs
The docs state that by default, the user will be logged out at the end of the current session. In fact, by default the user gets a cookie with a 3 month lifetime. This patch gives the default behaviour as documented: $ diff -u UserSessionCookie.pm UserSessionCookie.pm.patched --- UserSessionCookie.pm Wed Jan 5 15:02:06 2005 +++ UserSessionCookie.pm.patched Wed Sep 7 07:54:58 2005 @@ -105,11 +105,13 @@ $session{uid} = $uid if $uid and not exists $session{uid}; warn "Session's uid is $session{uid}" if $r->debug; my $cookie_name = $r->config->auth->{cookie_name} || "sessionid"; + my %expires = ( -expires => $r->config->auth->{cookie_expiry} ) + if exists $r->config->auth->{cookie_expiry}; my $cookie = CGI::Simple::Cookie->new( -name => $cookie_name, -value => $session{_session_id}, - -expires => $r->config->auth->{cookie_expiry} || '+3M', - -path => URI->new($r->config->uri_base)->path + -path => URI->new($r->config->uri_base)->path, + %expires, ); warn "Baking: ". $cookie->as_string if $r->debug; $r->headers_out->set("Set-Cookie",$cookie->as_string());
[DAVEBAIRD - Wed Sep 7 02:59:17 2005]: Show quoted text
> The docs state that by default, the user will be logged out at the end > of the current session. In fact, by default the user gets a cookie > with a 3 month lifetime. This patch gives the default behaviour as > documented: > > $ diff -u UserSessionCookie.pm UserSessionCookie.pm.patched > --- UserSessionCookie.pm Wed Jan 5 15:02:06 2005 > +++ UserSessionCookie.pm.patched Wed Sep 7 07:54:58 2005 > @@ -105,11 +105,13 @@ > $session{uid} = $uid if $uid and not exists $session{uid}; > warn "Session's uid is $session{uid}" if $r->debug; > my $cookie_name = $r->config->auth->{cookie_name} || "sessionid"; > + my %expires = ( -expires => $r->config->auth->{cookie_expiry} ) > + if exists $r->config->auth->{cookie_expiry}; > my $cookie = CGI::Simple::Cookie->new( > -name => $cookie_name, > -value => $session{_session_id}, > - -expires => $r->config->auth->{cookie_expiry} || '+3M', > - -path => URI->new($r->config->uri_base)->path > + -path => URI->new($r->config->uri_base)->path, > + %expires, > ); > warn "Baking: ". $cookie->as_string if $r->debug; > $r->headers_out->set("Set-Cookie",$cookie->as_string());
Applied in 1.8