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

Report information
The Basics
Id:
12423
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
japh [...] crackerjack.net
Cc:
AdminCc:

BugTracker
Severity:
Critical
Broken in:
3.95
Fixed in:
(no value)

Attachments


Subject: PostgreSQL Driver can cause crashes if database is missing information
When using the PostgreSQL driver, CGI::Session will attempt to deserialize an undefined value if the database does not contain the session key specified. This can cause some serializers (such as FreezeThaw) to return a structure instead of undef, resulting in problems further down the line (eg; an undefined 'id' value in the session object). I have attached a small patch that fixes this problem. Cheers, Tyler
Change 140121 by tylerm@tylerm-pipewrench on 2005/04/26 16:23:44 fix a small bug in CGI::Session rq=tylerm - note to self, submit this to CPAN Affected files ... ... //depot/main/Appliance/src/pmx/cpan-packages/CGI-Session/Session/PostgreSQL.pm#2 edit Differences ... ==== //depot/main/Appliance/src/pmx/cpan-packages/CGI-Session/Session/PostgreSQL.pm#2 (text) ==== @@ -114,7 +114,11 @@ $self->error("Couldn't acquire data on id '$sid'"); return undef; } - return $self->thaw($data); + if($data) { + return $self->thaw($data); + } else { + return; + } }
From: markstos@cpan.org
[guest - Tue Apr 26 20:25:13 2005]:
Show quoted text
> When using the PostgreSQL driver, CGI::Session will attempt to > deserialize an undefined value if the database does not contain
the
Show quoted text
> session key specified. This can cause some serializers (such as > FreezeThaw) to return a structure instead of undef, resulting in > problems further down the line (eg; an undefined 'id' value in the > session object). > > I have attached a small patch that fixes this problem. > > Cheers, > Tyler
Tyler, Thanks for the bug report. In CGI::Session 4.x, (a developer release is on CPAN), the driver system has been re-implemented, and I believe this bug has been resolved in the process. You are welcome to confirm for yourself, and a Test::More style test for this would be especially appreciated. Otherwise, I think this bug report can be considered resolved. Mark


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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