X-Git-Url: http://git.squeep.com/?p=squeep-authentication-module;a=blobdiff_plain;f=lib%2Fauthenticator.js;h=ba5d9217a86ca03efdaebd07c7b833338ddc7cce;hp=040834fd650cd46b4d61f6b03c1acf647721d0ff;hb=681ff60618195ab6754e5b8718a32e53ab2222ec;hpb=dcbdec0fcdf0b0241a155c89ae03f63ecba6d395 diff --git a/lib/authenticator.js b/lib/authenticator.js index 040834f..ba5d921 100644 --- a/lib/authenticator.js +++ b/lib/authenticator.js @@ -189,7 +189,7 @@ class Authenticator { (cookieHeader || '').split(/; */).forEach((field) => { const [ name, value ] = common.splitFirst(field, '=', null).map((x) => x && decodeURIComponent(x.trim())); if (name && !(name in cookie)) { - if (value && value.startsWith('"') && value.endsWith('"')) { + if (value?.startsWith('"') && value.endsWith('"')) { cookie[name] = value.slice(1, -1); // eslint-disable-line security/detect-object-injection } else { cookie[name] = value; // eslint-disable-line security/detect-object-injection