Skip to content
This repository was archived by the owner on Feb 3, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/cookie-sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ function extend(obj) {

exports.deserialize = function(secret, timeout, str){
// Parses a secure cookie string, returning the object stored within it.
// Throws an exception if the secure cookie string does not validate.
// Ignores cookie if the secure cookie string does not validate.

if(!exports.valid(secret, timeout, str)){
throw new Error('invalid cookie');
return undefined;
}
var data = exports.decrypt(secret, exports.split(str).data_blob);
return JSON.parse(data);
Expand Down