@companieshouse/node-session-handler
Advanced tools
Comparing version 4.1.6 to 4.1.7
@@ -70,13 +70,12 @@ "use strict"; | ||
if (request.session) { | ||
if (hash(request.session) !== originalSessionHash) { | ||
response.cookie(config.cookieName, sessionCookie, { | ||
domain: config.cookieDomain, | ||
path: "/", | ||
httpOnly: true, | ||
secure: config.cookieSecureFlag != null ? config.cookieSecureFlag : DEFAULT_COOKIE_SECURE_FLAG, | ||
maxAge: (config.cookieTimeToLiveInSeconds != null ? config.cookieTimeToLiveInSeconds | ||
: DEFAULT_COOKIE_TIME_TO_LIVE_IN_SECONDS) * 1000, | ||
encode: String | ||
}); | ||
} | ||
response.cookie(config.cookieName, sessionCookie, { | ||
domain: config.cookieDomain, | ||
path: "/", | ||
httpOnly: true, | ||
secure: config.cookieSecureFlag != null ? config.cookieSecureFlag : DEFAULT_COOKIE_SECURE_FLAG, | ||
maxAge: (config.cookieTimeToLiveInSeconds != null ? config.cookieTimeToLiveInSeconds | ||
: DEFAULT_COOKIE_TIME_TO_LIVE_IN_SECONDS) * 1000, | ||
encode: String | ||
}); | ||
Logger_1.loggerInstance().debug(`Refreshed session cookie ${sessionCookie}`); | ||
} | ||
@@ -83,0 +82,0 @@ else { |
{ | ||
"name": "@companieshouse/node-session-handler", | ||
"version": "4.1.6", | ||
"version": "4.1.7", | ||
"description": "Node.js session handler for Companies House", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
54194
721
1