fix(caldav): update legacy token migration to set token as empty string
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m29s
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m29s
This commit is contained in:
@@ -210,7 +210,7 @@ async function caldavAuth(req, res, next) {
|
|||||||
}
|
}
|
||||||
// Migrate legacy plaintext token to hashed version
|
// Migrate legacy plaintext token to hashed version
|
||||||
if (tokenRowLegacy && !tokenRow) {
|
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)
|
// Update last_used_at (fire and forget)
|
||||||
db.run('UPDATE caldav_tokens SET last_used_at = CURRENT_TIMESTAMP WHERE id = ?', [matchedToken.id]).catch(() => {});
|
db.run('UPDATE caldav_tokens SET last_used_at = CURRENT_TIMESTAMP WHERE id = ?', [matchedToken.id]).catch(() => {});
|
||||||
|
|||||||
Reference in New Issue
Block a user