From 1730d38946b9ec90c9cd98c4506d1e7337afb4f7 Mon Sep 17 00:00:00 2001 From: Daniel McQuiston Date: Thu, 24 May 2018 21:22:11 -0600 Subject: [PATCH] Make bad cookie logic more obvious on what it is checking for --- cookiejar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookiejar.js b/cookiejar.js index a19be10..d5969e4 100644 --- a/cookiejar.js +++ b/cookiejar.js @@ -78,7 +78,7 @@ var key = pair[1]; var value = pair[2]; - if (!key || !value) { + if ( typeof key !== 'string' || key.length === 0 || typeof value !== 'string' ) { console.warn("Unable to extract values from cookie header. Cookie: '"+str+"'"); return; }