From 3d219676817e8c7e300f587de742c0f93a2186c0 Mon Sep 17 00:00:00 2001 From: Michelle Date: Wed, 4 Mar 2026 09:26:22 +0100 Subject: [PATCH] fix(caldav): update legacy token migration to set token as empty string --- server/routes/caldav.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/caldav.js b/server/routes/caldav.js index 9fbb9e1..f413207 100644 --- a/server/routes/caldav.js +++ b/server/routes/caldav.js @@ -210,7 +210,7 @@ async function caldavAuth(req, res, next) { } // Migrate legacy plaintext token to hashed version if (tokenRowLegacy && !tokenRow) { - db.run('UPDATE caldav_tokens SET token_hash = ?, token = NULL WHERE id = ?', [tokenHash, matchedToken.id]).catch(() => {}); + db.run("UPDATE caldav_tokens SET token_hash = ?, token = '' WHERE id = ?", [tokenHash, matchedToken.id]).catch(() => {}); } // Update last_used_at (fire and forget) db.run('UPDATE caldav_tokens SET last_used_at = CURRENT_TIMESTAMP WHERE id = ?', [matchedToken.id]).catch(() => {});