Skip Menu |

This queue is for tickets about the Mojolicious-Plugin-WWWSession CPAN distribution.

Report information
The Basics
Id: 85047
Status: resolved
Priority: 0/
Queue: Mojolicious-Plugin-WWWSession

People
Owner: Nobody in particular
Requestors: florian [...] adamsky.it
Cc:
AdminCc:

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



Subject: Mojolicious::Plugin::WWWSession never sets the expires value
Date: Sat, 4 May 2013 15:03:49 +0200
To: bug-Mojolicious-Plugin-WWWSession [...] rt.cpan.org
From: Florian Adamsky <florian [...] adamsky.it>
Hello, I used your Perl Module Mojolicious::Plugin::WWWSession in one of my latest projects, since there is a need for a pure server side session management. However, I played with expiration a little bit and found out that even when I set a correct value for expires, the session never expires. After a while, I found out that your Modules does not set the value for expires correctly. The module WWW::Session in version 0.8 has the following constructor: sub new { my ($class,$sid,$data,$expires) = @_; $expires ||= -1; $data ||= {}; [...] Your modules only sets the $class, $sid and $data, but not $expires, as you can see in the following line: tie %session, 'WWW::Session' , $sid, {sid => $sid}; Attached you'll find a patch which adds $args->{expires} to this line in order to set the expiration time correctly. If you have any further questions about the patch or the bug, don't hesitate to ask me. Thanks Best regards -- Florian Adamsky http://florian.adamsky.it/

Message body is not shown because sender requested not to inline it.

Download signature.asc
application/pgp-signature 198b

Message body not shown because it is not plain text.

Hi Florian, Thanks for submitting the patch. I've applied it and I've uploaded version 0.06 to CPAN. Thanks, Horea. On Sat May 04 09:04:15 2013, florian@adamsky.it wrote: Show quoted text
> Hello, > > I used your Perl Module Mojolicious::Plugin::WWWSession in one of my > latest projects, since there is a need for a pure server side session > management. However, I played with expiration a little bit and found out > that even when I set a correct value for expires, the session never > expires. > > After a while, I found out that your Modules does not set the value for > expires correctly. The module WWW::Session in version 0.8 has the > following constructor: > > sub new { > my ($class,$sid,$data,$expires) = @_; > > $expires ||= -1; > $data ||= {}; > > [...] > > Your modules only sets the $class, $sid and $data, but not $expires, > as you can see in the following line: > > tie %session, 'WWW::Session' , $sid, {sid => $sid}; > > Attached you'll find a patch which adds $args->{expires} to this line > in order to set the expiration time correctly. > > If you have any further questions about the patch or the bug, don't > hesitate to ask me. > > Thanks > > Best regards