From 0c6c4f2cf4a0a0ab1261585e78543425a15bd382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chrislieb=C3=A4r?= Date: Tue, 26 Nov 2024 09:51:44 +0100 Subject: [PATCH] Fix handling of cookies for absolute domains --- extension/background.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extension/background.js b/extension/background.js index 5ec1506..b220dfb 100644 --- a/extension/background.js +++ b/extension/background.js @@ -195,9 +195,12 @@ async function cookieStr(cookieLines) { } function buildCookieLine(cookie) { + // 2nd argument controls subdomains, and must match leading dot in domain + let includeSubdomains = cookie.domain.startsWith('.') ? 'TRUE' : 'FALSE'; + return [ cookie.domain, - 'TRUE', + includeSubdomains, cookie.path, cookie.httpOnly.toString().toUpperCase(), Math.trunc(cookie.expirationDate) || 0,