Open xackery opened 6 months ago
Here's a fix diff:
diff --git a/loginserver/database.cpp b/loginserver/database.cpp
index 021c4e1..2e5ffd8 100644
--- a/loginserver/database.cpp
+++ b/loginserver/database.cpp
@@ -136,8 +136,8 @@ bool Database::CreateLoginData(const std::string &name, const std::string &passw
id = atoi(row[0]);
- auto insert_query = fmt::format("INSERT INTO {0} (AccountName, AccountPassword, AccountEmail, LastLoginDate, LastIPAddress) "
- " VALUES('{1}', SHA('{2}'), 'local_creation', NOW(), '127.0.0.1'); ",
+ auto insert_query = fmt::format("INSERT INTO {0} (AccountName, AccountPassword, AccountEmail, LastLoginDate, LastIPAddress, creationIP, forumname) "
+ " VALUES('{1}', SHA('{2}'), 'local_creation', NOW(), '127.0.0.1', '127.0.0.1', ''); ",
server.options.GetAccountTable(),
Strings::Escape(name),
Strings::Escape(password)
@@ -354,7 +354,7 @@ std::string Database::LoginSettings(std::string type)
return value.c_str();
}
-bool Database::CheckSettings(int type)
+bool Database::CheckSettings(int type)
{
if (type == 1)
{
Just a note about this issue... I'd ensure TAKP prod login.ini
auto_create_accounts
is FALSE before implementing above diff (99% sure it is). But just in case this bug was indirectly preventing auto creation.
I 2nd this diff - atm I have to include a sql file for devcontainer spin up. When this issue is closed I'll remove the manual injected sql file fix in devcontainer.
seems
then