mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-05 04:13:52 +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) {
|
||||
|
||||
std::string query = StringFormat("INSERT INTO `trader_audit` "
|
||||
"(`time`, `seller`, `buyer`, `itemname`, `quantity`, `totalcost`, `trantype`) "
|
||||
"VALUES (NOW(), '%s', '%s', '%s', %i, %i, %i)",
|
||||
seller, buyer, itemName, quantity, totalCost, tranType);
|
||||
const std::string& query = fmt::format(
|
||||
"INSERT INTO `trader_audit` "
|
||||
"(`time`, `seller`, `buyer`, `itemname`, `quantity`, `totalcost`, `trantype`) "
|
||||
"VALUES (NOW(), '{}', '{}', '{}', {}, {}, {})",
|
||||
seller,
|
||||
buyer,
|
||||
Strings::Escape(itemName),
|
||||
quantity,
|
||||
totalCost,
|
||||
tranType
|
||||
);
|
||||
database.QueryDatabase(query);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user