Fixed session key rotation problem with a default empty array on null value.

This commit is contained in:
SamTV12345 2023-08-29 17:53:20 +02:00
parent 3f6ba064d8
commit 587c7711c6

View file

@ -160,7 +160,7 @@ class SecretRotator {
// TODO: This is racy. If two instances start up at the same time and there are no existing
// matching publications, each will generate and publish their own paramters. In practice this
// is unlikely to happen, and if it does it can be fixed by restarting both Etherpad instances.
const dbKeys = await db.findKeys(`${this._dbPrefix}:*`, null);
const dbKeys = await db.findKeys(`${this._dbPrefix}:*`, null) || [];
let currentParams = null;
let currentId = null;
const dbWrites = [];