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
|
|
@ -139,6 +139,8 @@ void LoginDatabaseConnection::DoPrepareStatements()
|
|||
|
||||
PrepareStatement(LOGIN_SEL_ACCOUNT_TOTP_SECRET, "SELECT totp_secret FROM account WHERE id = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(LOGIN_UPD_ACCOUNT_TOTP_SECRET, "UPDATE account SET totp_secret = ? WHERE id = ?", CONNECTION_ASYNC);
|
||||
|
||||
PrepareStatement(LOGIN_INS_UPTIME, "INSERT INTO uptime (realmid, starttime, uptime, revision) VALUES (?, ?, 0, ?)", CONNECTION_ASYNC);
|
||||
}
|
||||
|
||||
LoginDatabaseConnection::LoginDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue