From 752d7564b39f31bca7945894ba13e33494ac7828 Mon Sep 17 00:00:00 2001 From: julianajlk Date: Mon, 18 Nov 2024 16:27:10 -0500 Subject: [PATCH 1/3] chore: Update allowlist github advisory --- audit-ci.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audit-ci.json b/audit-ci.json index 9ef402b2d..7edb4b42a 100644 --- a/audit-ci.json +++ b/audit-ci.json @@ -12,7 +12,8 @@ "GHSA-9wv6-86v2-598j", "GHSA-m6fv-jmcg-4jfg", "GHSA-cm22-4g7w-348p", - "GHSA-c7qv-q95q-8v27" + "GHSA-c7qv-q95q-8v27", + "GHSA-3xgq-45jj-v275" ], "moderate": true } From dbdcb314f36ecb3b58ec2c41926e696c6e5bf42c Mon Sep 17 00:00:00 2001 From: julianajlk Date: Mon, 18 Nov 2024 16:42:50 -0500 Subject: [PATCH 2/3] test: Update MockCookies to include remove function --- src/payment/PaymentPage.test.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/payment/PaymentPage.test.jsx b/src/payment/PaymentPage.test.jsx index f99de8d37..4a0bf6284 100644 --- a/src/payment/PaymentPage.test.jsx +++ b/src/payment/PaymentPage.test.jsx @@ -43,6 +43,10 @@ jest.mock('universal-cookie', () => { set(cookieName) { return MockCookies.result[cookieName]; } + + remove() { + return undefined; + } } return MockCookies; }); From 56ab83b8d35a41d0db930a7f2c730d2b78064557 Mon Sep 17 00:00:00 2001 From: julianajlk Date: Mon, 18 Nov 2024 16:25:46 -0500 Subject: [PATCH 3/3] fix: Remove existing Tagular cookie with outdated domain metadata --- src/cohesion/helpers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cohesion/helpers.js b/src/cohesion/helpers.js index c66c9ae55..3db71fc43 100644 --- a/src/cohesion/helpers.js +++ b/src/cohesion/helpers.js @@ -27,9 +27,14 @@ export const getCorrelationID = () => { paramId = uuidv4(); } + // If the tagular correlation ID cookie was set before we added the change to + // specify the domain, it was automatically added to the current domain. + // Always delete the cookie with the current domain + new Cookies().remove(COOKIE_NAME, { domain: window.location.hostname, path: '/' }); + const expirationDate = new Date(); expirationDate.setMinutes(expirationDate.getMinutes() + 30); // 30 mins expiration from now - new Cookies().set(COOKIE_NAME, paramId, { expires: expirationDate, domain: `.${getDomain()}` }); + new Cookies().set(COOKIE_NAME, paramId, { expires: expirationDate, domain: `.${getDomain()}`, path: '/' }); return paramId; };