mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Database): prevent crash due to special chars in branch name (#20776)
add prepared statements to escape special characters in branch name
This commit is contained in:
@@ -467,7 +467,10 @@ bool StartDB()
|
||||
ClearOnlineAccounts();
|
||||
|
||||
///- Insert version info into DB
|
||||
WorldDatabase.Execute("UPDATE version SET core_version = '{}', core_revision = '{}'", GitRevision::GetFullVersion(), GitRevision::GetHash()); // One-time query
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_VERSION);
|
||||
stmt->SetData(0, GitRevision::GetFullVersion());
|
||||
stmt->SetData(1, GitRevision::GetHash());
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
sWorld->LoadDBVersion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user