From ebac8ed30d90ab4ba434bb385712275aa2d34e60 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Mon, 13 Jan 2025 18:06:26 -0300 Subject: [PATCH] fix: database backup escape especial characteres --- src/database/database.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/database.cpp b/src/database/database.cpp index a6e732694b1..044d3c87514 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -82,8 +82,8 @@ void Database::createDatabaseBackup(bool compress) const { std::ofstream configFile(tempConfigFile); if (configFile.is_open()) { configFile << "[client]\n"; - configFile << "user=" << g_configManager().getString(MYSQL_USER) << "\n"; - configFile << "password=" << g_configManager().getString(MYSQL_PASS) << "\n"; + configFile << "user=\"" << g_configManager().getString(MYSQL_USER) << "\"\n"; + configFile << "password=\"" << g_configManager().getString(MYSQL_PASS) << "\"\n"; configFile << "host=" << g_configManager().getString(MYSQL_HOST) << "\n"; configFile << "port=" << g_configManager().getNumber(SQL_PORT) << "\n"; configFile.close();