mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-29 12:32:29 +00:00
[Bug] Escape item name in trader audit. (#3540)
* [Bug] Escape item name in trader audit. Quick fix to escape the item names in Trader Audit. * Update trading.cpp --------- Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
parent
2bb7bba724
commit
730738faf9
@ -1459,10 +1459,17 @@ void Client::TradeRequestFailed(const EQApplicationPacket* app) {
|
|||||||
|
|
||||||
static void BazaarAuditTrail(const char *seller, const char *buyer, const char *itemName, int quantity, int totalCost, int tranType) {
|
static void BazaarAuditTrail(const char *seller, const char *buyer, const char *itemName, int quantity, int totalCost, int tranType) {
|
||||||
|
|
||||||
std::string query = StringFormat("INSERT INTO `trader_audit` "
|
const std::string& query = fmt::format(
|
||||||
"(`time`, `seller`, `buyer`, `itemname`, `quantity`, `totalcost`, `trantype`) "
|
"INSERT INTO `trader_audit` "
|
||||||
"VALUES (NOW(), '%s', '%s', '%s', %i, %i, %i)",
|
"(`time`, `seller`, `buyer`, `itemname`, `quantity`, `totalcost`, `trantype`) "
|
||||||
seller, buyer, itemName, quantity, totalCost, tranType);
|
"VALUES (NOW(), '{}', '{}', '{}', {}, {}, {})",
|
||||||
|
seller,
|
||||||
|
buyer,
|
||||||
|
Strings::Escape(itemName),
|
||||||
|
quantity,
|
||||||
|
totalCost,
|
||||||
|
tranType
|
||||||
|
);
|
||||||
database.QueryDatabase(query);
|
database.QueryDatabase(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user