Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 24023
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: cees-perl [...] crtconsulting.ca
Cc:
AdminCc:

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



Subject: setting cooking expiry to 3600s fails
Hi Lincoln, v3.25 introduced a one character change in CGI::Util that breaks cookies that explicitly set the 's' for the number of seconds in the expiry offset. The regexp only accepts [mhdMy] as valid expiry modifiers, even though the docs (and all older version) also accepted 's'. The attached (trivial) patch fixes the problem by adding the 's' into the regexp. Cheers, Cees Hek
Subject: CGI_Util_expiry_fix.patch
--- CGI/Util.pm.3.25 2006-09-28 14:35:27.000000000 -0400 +++ CGI/Util.pm 2006-12-20 15:30:47.000000000 -0500 @@ -261,7 +261,7 @@ $offset = 0; } elsif ($time=~/^\d+/) { return $time; - } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([mhdMy])/) { + } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([smhdMy])/) { $offset = ($mult{$2} || 1)*$1; } else { return $time;
On Wed Dec 20 15:49:32 2006, CEESHEK wrote: Show quoted text
> Hi Lincoln, > > v3.25 introduced a one character change in CGI::Util that breaks cookies > that explicitly set the 's' for the number of seconds in the expiry > offset. The regexp only accepts [mhdMy] as valid expiry modifiers, even > though the docs (and all older version) also accepted 's'. > > The attached (trivial) patch fixes the problem by adding the 's' into > the regexp.
I'm just confirming this was released in 3.26, and closing this bug report. Thanks for the patch, Cees! (Your new humble CGI.pm co-maintainer). Mark