Bug#756000: regression in Catalyst::Plugin::Session (since ver. 0.35)

Martin Zobel-Helas zobel at debian.org
Fri Jul 25 11:30:43 UTC 2014


Package: libcatalyst-plugin-session-perl
Severity: minor
Tags: patch

Hi,

In the version 0.35 of Session.pm, the method
"calculate_initial_session_expires" has been changed and now it tries to
get a stored session_expired if sessionid exists. One of its usage is
inside reset_session_expires() which is called during a session
creation.

There is no real need to ask for session data here because the
session was just created. 

In most cases, an additional get_session_data() call costs nothing, but
we are using Infinispan as session store for caching and such call means
at least one or even several remote requests returning no data. The
simple fix for this problem can be as follows.

 sub create_session_id {
     my $c = shift;

     my $sid = $c->generate_session_id;

     $c->log->debug(qq/Created session "$sid"/) if $c->debug;

-    $c->_sessionid($sid);
     $c->reset_session_expires;
+    $c->_sessionid($sid);
     $c->set_session_id($sid);

     return $sid;
 } 




-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
 Martin Zobel-Helas <zobel at debian.org>    Debian System Administrator
 Debian & GNU/Linux Developer                       Debian Listmaster
 http://about.me/zobel                               Debian Webmaster
 GPG Fingerprint:  6B18 5642 8E41 EC89 3D5D  BDBB 53B1 AC6D B11B 627B 



More information about the pkg-perl-maintainers mailing list