Skip Menu |
 

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

Report information
The Basics
Id: 27476
Status: resolved
Priority: 0/
Queue: Apache-Session

People
Owner: CHORNY [...] cpan.org
Requestors: rick [...] bort.ca
Cc:
AdminCc:

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

Attachments


Subject: [PATCH] unserialize failures
Date: Thu, 7 Jun 2007 01:34:37 -0400
To: bugs-Apache-Session [...] rt.cpan.org
From: Rick Delaney <rick [...] bort.ca>
Download (untitled) / with headers
text/plain 841b
Storable::thaw() returns undef for certain kinds of failures instead of exceptions. For example, use Storable qw(nfreeze thaw); my $x = nfreeze([0]); chop $x; print "undef\n" unless defined thaw($x); This can lead to silent session-dropping which is very hard to debug. My problem was when trying to restore a large session using the MySQL Store. The session was truncated because I only used a BLOB field when I needed a LONGBLOB. Because of this, the session data was set to undef by unserialize (resulting in sending users back to the login screen). I'd guess that DB_File would suffer from this for large sessions, too. I've attached a patch to the Serialize classes which raises an exception when Storable::thaw() returns undef. Please consider it for your next release. Thanks, -- Rick Delaney rick@bort.ca

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

From: mark [...] aufflick.com
Download (untitled) / with headers
text/plain 117b
I second this request - I've been manually making this patch for years (just never gotten around to submitting it...)
1.83_01 has this patch applied. -- Alexandr Ciornii, http://chorny.net


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.