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

koa-generic-session

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-generic-session - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

7

History.md
1.2.0 / 2014-08-09
==================
* Merge pull request #25 from mekwall/patch-2
* Added description for allowEmpty option
* Added option to allow generation of empty session
1.1.3 / 2014-08-05

@@ -3,0 +10,0 @@ ==================

3

lib/session.js

@@ -36,2 +36,3 @@ /**!

signed: true,
allowEmpty: false,
maxAge: 24 * 60 * 60 * 1000 //one day in ms

@@ -180,3 +181,3 @@ };

// if new session and not modified, just ignore
if (!this.sessionId && newHash === EMPTY_SESSION_HASH) {
if (!options.allowEmpty && !this.sessionId && newHash === EMPTY_SESSION_HASH) {
return debug('new session and do not modified');

@@ -183,0 +184,0 @@ }

@@ -5,3 +5,3 @@ {

"repository": "koajs/generic-session",
"version": "1.1.3",
"version": "1.2.0",
"keywords": ["koa", "middleware", "session"],

@@ -8,0 +8,0 @@ "author": "dead_horse <dead_horse@qq.com>",

@@ -69,2 +69,3 @@ generic-session [![Build Status](https://secure.travis-ci.org/koajs/generic-session.svg)](http://travis-ci.org/koajs/generic-session)

* `defer`: defers get session, only generate a session when you use it through `var session = yield this.session;`, defaults to `false`
* `allowEmpty`: allow generation of empty sessions

@@ -71,0 +72,0 @@ * Store can be any Object that has the methods `set`, `get`, `destroy` like [MemoryStore](https://github.com/koajs/koa-session/blob/master/lib/store.js).

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