From ad2908dd6a286a9bc905ecdc1607c77122f3e0ec Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 13 Sep 2008 17:15:58 +0200 Subject: [PATCH] CGI.pm: Cope with corrupted cookie headers. --- ucw/perl/CGI.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.2