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:
parent
e3bcb6c14b
commit
6b5f50cdbe
6 changed files with 15 additions and 3 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue