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(() => {});