diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e2c1ae..00df7fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.5.4] - 2026-04-03 + +### Fixed +- Fix SQLCipher PRAGMA key syntax error on fresh install — hex-encoded key must be wrapped in double quotes for valid PRAGMA syntax (fixes #3) + ## [0.5.3] - 2026-04-03 ### Security diff --git a/package.json b/package.json index c104293..9d4daf3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oikos", - "version": "0.5.2", + "version": "0.5.4", "description": "Selbstgehosteter Familienplaner — Kalender, Aufgaben, Einkauf, Essensplan, Budget und mehr. Privat, offen, ohne Abo.", "main": "server/index.js", "engines": { diff --git a/server/db.js b/server/db.js index c146d95..a6f65ac 100644 --- a/server/db.js +++ b/server/db.js @@ -33,7 +33,8 @@ function init() { if (DB_KEY) { // Nur wirksam wenn Binary gegen SQLCipher kompiliert ist (Docker) - db.pragma(`key=x'${Buffer.from(DB_KEY, 'utf8').toString('hex')}'`); + db.pragma(`key="x'${Buffer.from(DB_KEY, 'utf8').toString('hex')}'"`); + // Sicherstellen dass die Datenbank tatsächlich entschlüsselbar ist try { db.prepare('SELECT count(*) FROM sqlite_master').get();