From 651b62686c903cfe023ff561840186fc39b96174 Mon Sep 17 00:00:00 2001 From: Tandloze Date: Sat, 15 Aug 2015 23:24:44 +0200 Subject: [PATCH] Fixed some things Added $config to enable or disable country flags its on false by default. Also some advice from Znote for securing integer database values. Cleanedup some if statements. --- characterprofile.php | 68 +++++++++----------------------------------- config.php | 3 ++ helpdesk.php | 4 +-- 3 files changed, 18 insertions(+), 57 deletions(-) diff --git a/characterprofile.php b/characterprofile.php index 535513b..b57cdab 100644 --- a/characterprofile.php +++ b/characterprofile.php @@ -7,7 +7,7 @@ if ($config['log_ip']) if (isset($_GET['name']) === true && empty($_GET['name']) === false) { - $name = $_GET['name']; + $name = getValue($_GET['name']); $user_id = user_character_exist($name); if ($user_id !== false) @@ -19,7 +19,7 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) if ($config['Ach']) { - $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`='$user_id'"); + $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`=(int)$user_id"); } } @@ -47,8 +47,12 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false)

Profile: