From 5df6a61c96d902dba549854f572ae1712e0d0f7e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 7 Jun 2022 21:19:24 -0400 Subject: [PATCH] [Bug Fix] Hacker_Str was causing sql errors - Non Escaped (#2251) Processing the hacker_str through EscapeString(). --- zone/client_packet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index a1d474dec..cfa2c2324 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -13095,7 +13095,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app) auto hacker_str = fmt::format("Vendor Cheat: attempted to buy {} of {}: {} that cost {} cp but only has {} pp {} gp {} sp {} cp", mpo->quantity, item->ID, item->Name, mpo->price, m_pp.platinum, m_pp.gold, m_pp.silver, m_pp.copper); - database.SetMQDetectionFlag(AccountName(), GetName(), hacker_str, zone->GetShortName()); + database.SetMQDetectionFlag(AccountName(), GetName(), EscapeString(hacker_str), zone->GetShortName()); safe_delete(outapp); safe_delete(inst); return; @@ -14022,7 +14022,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) { auto hacker_str = fmt::format("{} attempting to target something untargetable, {} bodytype: {}", GetName(), GetTarget()->GetName(), (int)GetTarget()->GetBodyType()); - database.SetMQDetectionFlag(AccountName(), GetName(), hacker_str, zone->GetShortName()); + database.SetMQDetectionFlag(AccountName(), GetName(), EscapeString(hacker_str), zone->GetShortName()); SetTarget((Mob*)nullptr); return; } @@ -14059,7 +14059,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) (zone->newzone_data.maxclip * zone->newzone_data.maxclip), GetX(), GetY(), GetZ(), GetTarget()->GetName(), GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ()); - database.SetMQDetectionFlag(AccountName(), GetName(), hacker_str, zone->GetShortName()); + database.SetMQDetectionFlag(AccountName(), GetName(), EscapeString(hacker_str), zone->GetShortName()); SetTarget(nullptr); return; } @@ -14073,7 +14073,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) GetName(), (zone->newzone_data.maxclip * zone->newzone_data.maxclip), GetX(), GetY(), GetZ(), GetTarget()->GetName(), GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ()); - database.SetMQDetectionFlag(AccountName(), GetName(), hacker_str, zone->GetShortName()); + database.SetMQDetectionFlag(AccountName(), GetName(), EscapeString(hacker_str), zone->GetShortName()); SetTarget(nullptr); return; }