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 4.0.3 to 4.0.4

4

lib/session.js

@@ -1,2 +0,2 @@

import { parse } from "cookie";
import c from "cookie";
import { nanoid } from "nanoid";

@@ -54,3 +54,3 @@ import MemoryStore from "./memory-store.js";

let sessionId = (_req$headers = req.headers) !== null && _req$headers !== void 0 && _req$headers.cookie ? parse(req.headers.cookie)[name] : null;
let sessionId = (_req$headers = req.headers) !== null && _req$headers !== void 0 && _req$headers.cookie ? c.parse(req.headers.cookie)[name] : null;

@@ -57,0 +57,0 @@ if (sessionId && decode) {

@@ -1,2 +0,2 @@

import { serialize } from "cookie";
import c from "cookie";
export function hash(sess) {

@@ -10,3 +10,3 @@ return JSON.stringify(sess, (key, val) => key === "cookie" ? undefined : val);

if (res.headersSent) return;
const cookieStr = serialize(name, encodeFn ? encodeFn(id) : id, {
const cookieStr = c.serialize(name, encodeFn ? encodeFn(id) : id, {
path: cookie.path,

@@ -13,0 +13,0 @@ httpOnly: cookie.httpOnly,

{
"type": "module",
"name": "next-session",
"version": "4.0.3",
"version": "4.0.4",
"description": "Simple promise-based session for Next.js",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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