mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-24 21:46:11 +00:00
fix: security patching due to mysql injection vulnerabilities everywhere
This commit is contained in:
@@ -9,11 +9,12 @@
|
||||
| Copyright: TravianX Project All rights reserved |
|
||||
\*-------------------------------------------------------*/
|
||||
|
||||
include_once("GameEngine/Data/hero_full.php");
|
||||
include_once("GameEngine/Data/hero_full.php");
|
||||
global $database;
|
||||
|
||||
if (isset($_POST['name'])) {
|
||||
$_POST['name'] = stripslashes($_POST['name']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."hero SET `name`='".($_POST['name'])."' where `uid`='".$session->uid."'") or die("ERROR:".mysqli_error());
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."hero SET `name`='".($database->escape($_POST['name']))."' where `uid`='".$session->uid."'") or die("ERROR:".mysqli_error());
|
||||
$hero = mysqli_query("SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = " . $session->uid . "");
|
||||
$hero_info = mysqli_fetch_array($hero);
|
||||
echo "".NAME_CHANGED."";
|
||||
|
||||
Reference in New Issue
Block a user