From 1303603db90ccf14ee6e71ee0cd3d0289d3f81a6 Mon Sep 17 00:00:00 2001 From: Beaudan Campbell-Brown Date: Mon, 10 Dec 2018 14:44:56 +1100 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Mikunj --- app/sql.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/sql.js b/app/sql.js index be40b0df5..050ef7d1b 100644 --- a/app/sql.js +++ b/app/sql.js @@ -193,7 +193,7 @@ async function setupSQLCipher(instance, { key }) { const deriveKey = HEX_KEY.test(key); // https://www.zetetic.net/sqlcipher/sqlcipher-api/#key - const value = deriveKey ? `'${key}'` : `"x'${key}'"` + const value = deriveKey ? `'${key}'` : `"x'${key}'"`; await instance.run(`PRAGMA key = ${value};`); } @@ -204,7 +204,7 @@ async function setSQLPassword(password) { // If the password isn't hex then we need to derive a key from it const deriveKey = HEX_KEY.test(password); - const value = deriveKey ? `'${password}'` : `"x'${password}'"` + const value = deriveKey ? `'${password}'` : `"x'${password}'"`; await db.run(`PRAGMA rekey = ${value};`); }