From: Martin Mares Date: Sat, 13 Sep 2008 15:15:58 +0000 (+0200) Subject: CGI.pm: Cope with corrupted cookie headers. X-Git-Tag: holmes-import~294^2~1 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ad2908dd6a286a9bc905ecdc1607c77122f3e0ec;p=libucw.git CGI.pm: Cope with corrupted cookie headers. --- diff --git a/ucw/perl/CGI.pm b/ucw/perl/CGI.pm index 7389511a..8e4096e6 100644 --- a/ucw/perl/CGI.pm +++ b/ucw/perl/CGI.pm @@ -459,7 +459,8 @@ sub parse_cookies() { my @cook = (); foreach my $x (split /;\s*/, $h) { my ($k,$v) = split /=/, $x; - push @cook, $k => url_deescape($v); + $v = url_deescape($v) if defined $v; + push @cook, $k => $v; } return @cook; }