[Bug Fix] Hacker_Str was causing sql errors - Non Escaped (#2251)

Processing the hacker_str through EscapeString().
This commit is contained in:
Michael 2022-06-07 21:19:24 -04:00 committed by GitHub
parent fc5105eed7
commit 5df6a61c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}