From e790ff506ae0fa194a4a9b6dc62e422ef7e7fec2 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven.rezic@idealo.de>
Date: Thu, 5 Oct 2023 14:21:12 +0200
Subject: [PATCH] accept old and new cookie data format (RT #149959)

---
 t/06_expiry.t | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/06_expiry.t b/t/06_expiry.t
index bff7db7..dc01e35 100644
--- a/t/06_expiry.t
+++ b/t/06_expiry.t
@@ -19,7 +19,7 @@ my $t1_output = $t1_obj->run();
 like($t1_output, qr/\(3600\)/, 'expiry set correctly');
 like($t1_output, qr/Set-Cookie: CGISESSID=[a-zA-Z0-9]+/, 'session cookie set');
 like($t1_output, qr/expires=\w{3}, /, 'session cookie expiry set');
-my ($year) = $t1_output =~ /\d+\-\w{3}\-(\d+) /s;
+my ($year) = $t1_output =~ /\d+[ \-]\w{3}[ \-](\d+) /s;
 
 my ($id1) = $t1_output =~ /CGISESSID=([a-zA-Z0-9]+)/s;
 ok($id1, 'found session id');
@@ -38,7 +38,7 @@ $t1_output = $t1_obj->run();
 like($t1_output, qr/\(3600\)/, 'expiry set correctly');
 like($t1_output, qr/Set-Cookie: CGISESSID=[a-zA-Z0-9]+/, 'session cookie set');
 like($t1_output, qr/expires=\w{3}, /, 'session cookie expiry set');
-my ($year2) = $t1_output =~ /\d+\-\w{3}\-(\d+) /s;
+my ($year2) = $t1_output =~ /\d+[ \-]\w{3}[ \-](\d+) /s;
 
 # This test will fail during the last hour of the year, but I can't be bother to
 # test for that :)
@@ -62,7 +62,7 @@ $t1_output = $t1_obj->run();
 like($t1_output, qr/\(\-31536000\)/, 'expiry set correctly');
 like($t1_output, qr/Set-Cookie: CGISESSID=[a-zA-Z0-9]+/, 'session cookie set');
 like($t1_output, qr/expires=\w{3}, /, 'session cookie expiry set');
-($year2) = $t1_output =~ /\d+\-\w{3}\-(\d+) /s;
+($year2) = $t1_output =~ /\d+[ \-]\w{3}[ \-](\d+) /s;
 
 # This test will fail during the last hour of the year, but I can't be bother to
 # test for that :)
-- 
2.25.1