From 85887a93c45b87f7791d86250a69a07c41268034 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 12 Jul 2021 13:44:55 +0000 Subject: Fix session expiration. --- connect-better-sqlite3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'connect-better-sqlite3.js') diff --git a/connect-better-sqlite3.js b/connect-better-sqlite3.js index 173b75d..2bfdb12 100644 --- a/connect-better-sqlite3.js +++ b/connect-better-sqlite3.js @@ -30,7 +30,7 @@ module.exports = function (session) { let db = new SQLite(db_path, options.mode); db.exec("CREATE TABLE IF NOT EXISTS "+table+" (sid PRIMARY KEY, expires INTEGER, sess TEXT)"); - db.exec("DELETE FROM "+table+" WHERE ? > expires"); + db.exec("DELETE FROM "+table+" WHERE "+now()+" > expires"); db.exec("VACUUM"); this.sql_destroy = db.prepare("DELETE FROM "+table+" WHERE sid = ?"); -- cgit v1.2.3