replace plain-text password with hashed one
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -10,9 +10,9 @@ let createSQLStmt = `CREATE TABLE IF NOT EXISTS users
|
|||||||
db.exec(createSQLStmt);
|
db.exec(createSQLStmt);
|
||||||
|
|
||||||
// check if there are any users; if not add one default admin one
|
// check if there are any users; if not add one default admin one
|
||||||
const userPassword = 'A-InnoHUB_2025!';
|
// const saltRounds = 12;
|
||||||
const saltRounds = 12;
|
// const hashedUserPassword = bcrypt.hashSync(userPasswordHashed, saltRounds);
|
||||||
const hashedUserPassword = bcrypt.hashSync(userPassword, saltRounds);
|
const hashedUserPassword = '$2b$12$d6bDzoDluXeCTuoxmWSVtOp5Cpian3mZm8qxzox6B37BIf6qtOnnG';
|
||||||
const checkInsertSQLStmt = `INSERT INTO users (name, pw) SELECT 'admin', '${hashedUserPassword}'
|
const checkInsertSQLStmt = `INSERT INTO users (name, pw) SELECT 'admin', '${hashedUserPassword}'
|
||||||
WHERE NOT EXISTS (SELECT * FROM users);`;
|
WHERE NOT EXISTS (SELECT * FROM users);`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user