Socket
Socket
Sign inDemoInstall

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.11.0 to 1.11.1

5

History.md
1.11.1 / 2016-06-23
==================
* fix: make sure ctx.session exists when cookie.path = '/' (#91)
1.11.0 / 2016-06-20

@@ -3,0 +8,0 @@ ==================

10

lib/session.js

@@ -157,3 +157,7 @@ /**!

let pathname = parse(ctx).pathname;
if (pathname.indexOf(cookie.path || '/') !== 0) {
let cookiePath = cookie.path || '/';
if (cookiePath === '/') {
return true;
}
if (pathname.indexOf(cookiePath) !== 0) {
debug('cookie path not match');

@@ -232,3 +236,3 @@ return false;

function *refreshSession (session, originalHash, isNew) {
// reject any session changes, and do not update session expiry

@@ -248,3 +252,3 @@ if(this._sessionSave === false) {

}
// force saving non-empty session

@@ -251,0 +255,0 @@ if(this._sessionSave === true) {

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

"repository": "koajs/generic-session",
"version": "1.11.0",
"version": "1.11.1",
"keywords": [

@@ -8,0 +8,0 @@ "koa",

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