Skip to content
Browse files

session reaping fix

  • Loading branch information...
1 parent 4bde320 commit 10f1c4c9e3028d797bea2675b56cecced1193824 @cadorn cadorn committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 plugins-server/cloud9.session.file/session-ext.js
View
8 plugins-server/cloud9.session.file/session-ext.js
@@ -48,7 +48,13 @@ var FileStore = function(options) {
console.error(err);
return;
}
- var sess = JSON.parse(data);
+ var sess;
+ try {
+ sess = JSON.parse(data);
+ } catch(err) {
+ console.warn("Error '" + err + "' while reading session from file: " + self.basePath + "/" + file);
+ return;
+ }
var expires = (typeof sess.cookie.expires === 'string')
? new Date(sess.cookie.expires)
: sess.cookie.expires;

0 comments on commit 10f1c4c

Please sign in to comment.
Something went wrong with that request. Please try again.