From b3fe2a4b84b5cb45fe4743334549482d5dc6ac84 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 17 Sep 2021 16:08:03 +0200 Subject: [PATCH] Set correct default ghost expiration --- src/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/users.js b/src/users.js index a21e45019..e29b65b13 100644 --- a/src/users.js +++ b/src/users.js @@ -250,7 +250,7 @@ async function setGhost(user, password, expiresAt) { assert.strictEqual(typeof password, 'string'); assert.strictEqual(typeof expiresAt, 'number'); - expiresAt = expiresAt || DEFAULT_GHOST_LIFETIME; + expiresAt = expiresAt || (Date.now() + DEFAULT_GHOST_LIFETIME); debug(`setGhost: ${user.username} expiresAt ${expiresAt}`);