Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Session CPAN distribution.

Report information
The Basics
Id: 59595
Status: new
Priority: 0/
Queue: Catalyst-Plugin-Session

People
Owner: bobtfish [...] bobtfish.net
Requestors: deflexor [...] yahoo.com
Cc:
AdminCc:

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



Subject: extend_session_expires not working as expected
This is mainly for CatalystX-SimpleLogin. That plugin implements "remember me" functionality, which is rely on $c->session->extend_session_expires(seconds) call. This is currently not working because now its hardcoded that extend_session_expires only extends session for no more seconds than specified in session config.
From: deflexor [...] yahoo.com
Срд Июл 21 05:57:11 2010, xtonic писал: Show quoted text
> This is mainly for CatalystX-SimpleLogin. That plugin implements > "remember me" functionality, which is rely on > $c->session->extend_session_expires(seconds) call. > This is currently not working because now its hardcoded that > extend_session_expires only extends session for no more seconds than > specified in session config.
Here is patch that fixes the problem.
Subject: C-P-Session.patch
--- lib/Catalyst/Plugin/Session.pm 2010-06-24 16:52:53.000000000 +0400 +++ /usr/local/share/perl/5.10.1/Catalyst/Plugin/Session.pm 2010-07-21 12:13:19.122002141 +0400 @@ -347,7 +347,10 @@ if ( defined( my $expires = $c->_extended_session_expires ) ) { return $expires; } elsif ( defined( $expires = $c->_load_session_expires ) ) { - return $c->extend_session_expires( $expires ); + my $cfg_expires = $c->calculate_initial_session_expires; + return ($cfg_expires > $expires) ? + $c->extend_session_expires( $cfg_expires ) : + $c->extend_session_expires( $expires ); } else { return 0; } @@ -367,7 +370,7 @@ sub calculate_extended_session_expires { my ( $c, $prev ) = @_; - $c->calculate_initial_session_expires; + $prev; } sub reset_session_expires {