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

connect-redis

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-redis - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

9

lib/connect-redis.js

@@ -64,5 +64,8 @@ /*!

// Since we need to update the expires value on the cookie,
// we update the whole session object.
this.set(sid, sess, cb)
let key = this.prefix + sid
this.client.expire(key, this._getTTL(sess), (err, ret) => {
if (err) return cb(err)
if (ret !== 1) return cb(null, 'EXPIRED')
cb(null, 'OK')
})
}

@@ -69,0 +72,0 @@

{
"name": "connect-redis",
"description": "Redis session store for Connect",
"version": "4.0.2",
"version": "4.0.3",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

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

@@ -76,8 +76,9 @@ const test = require('blue-tape')

ttl = 90
expires = new Date(Date.now() + ttl * 1000).toISOString()
res = await p(store, 'touch')('456', { cookie: { expires } })
let newExpires = new Date(Date.now() + ttl * 1000).toISOString()
// note: cookie.expires will not be updated on redis (see https://github.com/tj/connect-redis/pull/285)
res = await p(store, 'touch')('456', { cookie: { expires: newExpires } })
t.equal(res, 'OK', 'set cookie expires touch')
res = await p(store.client, 'ttl')('sess:456')
t.ok(res >= 60, 'check expires ttl touch')
t.ok(res > 60, 'check expires ttl touch')

@@ -84,0 +85,0 @@ res = await p(store, 'length')()

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