Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

next-session

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-session - npm Package Compare versions

Comparing version 3.4.2 to 3.4.3

20

dist/core.js

@@ -113,2 +113,10 @@ "use strict";

}
// Extends the expiry of the session
// if touchAfter is applicable
if (touchAfter >= 0 && session.cookie.expires) {
const lastTouchedTime = session.cookie.expires.getTime() - session.cookie.maxAge * 1000;
if (_now - lastTouchedTime >= touchAfter) {
resetMaxAge(session);
}
}
}

@@ -163,10 +171,2 @@ else {

}
// Extends the expiry of the session
// if touchAfter is applicable
if (touchAfter >= 0 && session.cookie.expires) {
const lastTouchedTime = session.cookie.expires.getTime() - session.cookie.maxAge * 1000;
if (_now - lastTouchedTime >= touchAfter) {
resetMaxAge(session);
}
}
// autocommit: We commit the header and save the session automatically

@@ -178,3 +178,5 @@ // by "proxying" res.writeHead and res.end methods. After committing, we

res.writeHead = function resWriteHeadProxy(...args) {
if (session.isNew || isTouched || isDestroyed) {
if ((session.isNew && Object.keys(session).length > 1) ||
isTouched ||
isDestroyed) {
commitHead(res, name, session, encode);

@@ -181,0 +183,0 @@ }

{
"name": "next-session",
"version": "3.4.2",
"version": "3.4.3",
"description": "Simple promise-based session middleware for Next.js",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc