You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Preparar e executar a primeira consulta
$select_guildhouse = $db->prepare('SELECT house_id, listid, list FROM house_lists WHERE house_id = :house_id');
$select_guildhouse->execute(['house_id' => $guild_residence]);
$get_guildhouse = $select_guildhouse->fetch();
$count_guildhouse = $select_guildhouse->rowCount();
if ($count_guildhouse > 0) {
// Preparar e executar a segunda consulta
$get_house = $db->prepare('SELECT id, owner, paid, name, town_id FROM houses WHERE id = :id');
$get_house->execute(['id' => $get_guildhouse['house_id']]);
$house = $get_house->fetch();
$house_name = $house['name'];
}
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Priority
Critical
Area
System
What OS are you seeing the problem on?
Linux
Browser
Edge
What happened?
a função residence em show.php pode ser vulnerável a SQL Injection e também pode causar problemas se a variável $guild_residence estiver vazia ou contiver caracteres especiais.
https://github.com/opentibiabr/myaac/blob/main/system/pages/guilds/show.php#L114
correção.
// RESIDENCE
$guild_residence = $guild->getCustomField('residence');
// Preparar e executar a primeira consulta
$select_guildhouse = $db->prepare('SELECT
house_id
,listid
,list
FROMhouse_lists
WHEREhouse_id
= :house_id');$select_guildhouse->execute(['house_id' => $guild_residence]);
$get_guildhouse = $select_guildhouse->fetch();
$count_guildhouse = $select_guildhouse->rowCount();
if ($count_guildhouse > 0) {
// Preparar e executar a segunda consulta
$get_house = $db->prepare('SELECT
id
,owner
,paid
,name
,town_id
FROMhouses
WHEREid
= :id');$get_house->execute(['id' => $get_guildhouse['house_id']]);
$house = $get_house->fetch();
$house_name = $house['name'];
}
Code of Conduct
The text was updated successfully, but these errors were encountered: