This commit is contained in:
Benjamin Toby
2024-12-09 12:45:39 +01:00
parent 7bd4b2fe65
commit 586e3cfa85
43 changed files with 216 additions and 506 deletions
@@ -110,7 +110,7 @@ async function refreshUsersAndGrants({
!mariadbUser
) {
const createNewUser = await noDatabaseDbHandler(
`CREATE USER IF NOT EXISTS '${dslUsername}'@'${defaultMariadbUserHost}' IDENTIFIED BY '${dsqlPassword}' REQUIRE SSL`
`CREATE USER IF NOT EXISTS '${dslUsername}'@'${defaultMariadbUserHost}' IDENTIFIED BY '${dsqlPassword}'`
);
console.log("createNewUser", createNewUser);
@@ -223,7 +223,7 @@ async function refreshUsersAndGrants({
if (!isExtraMariadbUserExisting) {
await noDatabaseDbHandler(
`CREATE USER IF NOT EXISTS '${username}'@'${host}' IDENTIFIED BY '${decrptedPassword}' REQUIRE SSL`
`CREATE USER IF NOT EXISTS '${username}'@'${host}' IDENTIFIED BY '${decrptedPassword}'`
);
}
+1 -1
View File
@@ -60,7 +60,7 @@ async function resetSQLCredentials() {
);
await noDatabaseDbHandler(
`CREATE USER IF NOT EXISTS '${username}'@'${defaultMariadbUserHost}' IDENTIFIED BY '${password}' REQUIRE SSL`
`CREATE USER IF NOT EXISTS '${username}'@'${defaultMariadbUserHost}' IDENTIFIED BY '${password}'`
);
await noDatabaseDbHandler(
+1 -1
View File
@@ -56,7 +56,7 @@ async function setSQLCredentials() {
const encryptedPassword = encrypt({ data: password });
await noDatabaseDbHandler(
`CREATE USER IF NOT EXISTS '${username}'@'127.0.0.1' IDENTIFIED BY '${password}' REQUIRE SSL`
`CREATE USER IF NOT EXISTS '${username}'@'127.0.0.1' IDENTIFIED BY '${password}'`
);
await noDatabaseDbHandler(
+1 -1
View File
@@ -59,7 +59,7 @@ async function testSQLEscape() {
);
await noDatabaseDbHandler(
`CREATE USER IF NOT EXISTS '${username}'@'${defaultMariadbUserHost}' IDENTIFIED BY '${password}' REQUIRE SSL`
`CREATE USER IF NOT EXISTS '${username}'@'${defaultMariadbUserHost}' IDENTIFIED BY '${password}'`
);
await noDatabaseDbHandler(
+1 -1
View File
@@ -56,7 +56,7 @@ const connection = mysql({
}
const addUserSSL = await connection.query(
`ALTER USER '${User}'@'${Host}' REQUIRE SSL`
`ALTER USER '${User}'@'${Host}'`
);
console.log(`addUserSSL => ${User}@${Host}`, addUserSSL);