mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-09 16:24:22 +00:00
fix: security vulnerabilities (#1980)
* fix: security vulnerabilities Tested that all functions related to the touched files work will test sqlite on a CI build * fix failing test * ai feedback * add buffer size checking * use c_str * dont log session key * Try this for a mac definition * be quiet apple
This commit is contained in:
@@ -114,11 +114,13 @@ bool Precondition::Check(Entity* player, bool evaluateCosts) const {
|
||||
|
||||
|
||||
bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluateCosts) const {
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto* inventoryComponent = player->GetComponent<InventoryComponent>();
|
||||
auto* destroyableComponent = player->GetComponent<DestroyableComponent>();
|
||||
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
|
||||
auto* character = player->GetCharacter();
|
||||
auto [missionComponent, inventoryComponent, destroyableComponent, levelComponent] =
|
||||
player->GetComponentsMut<const MissionComponent, /* not const */ InventoryComponent, const DestroyableComponent, const LevelProgressionComponent>();
|
||||
|
||||
if (!missionComponent || !inventoryComponent || !destroyableComponent || !levelComponent || !character) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Mission* mission;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user