From 9444d300b8a2881c42302a67047e5989e5616a69 Mon Sep 17 00:00:00 2001 From: Robin Malley Date: Sat, 11 Sep 2021 21:50:23 +0000 Subject: [PATCH] Allow logged in users to use their session immediately. Fix a bug where unit tests are attempting to log in and use their session key in the same second that the session key was created. --- src/sql/select_valid_sessions.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/select_valid_sessions.sql b/src/sql/select_valid_sessions.sql index 9563217..f9cf612 100644 --- a/src/sql/select_valid_sessions.sql +++ b/src/sql/select_valid_sessions.sql @@ -3,4 +3,4 @@ FROM authors, sessions WHERE sessions.key = :key AND sessions.author = authors.id AND - sessions.start - strftime('%s','now') < 60*60*24; + sessions.start - strftime('%s','now') <= 60*60*24;