mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-12 22:31:02 +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."";
|
||||
|
||||
@@ -120,7 +120,7 @@ $lvname = $database->getVillageField($row["wref"], 'name');
|
||||
<label class="lastTargets">Last targets:</label>
|
||||
<select name="target_id">
|
||||
<?php
|
||||
$getwref = "SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = ".$_GET['lid']."";
|
||||
$getwref = "SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = ".$database->escape($_GET['lid'])."";
|
||||
$arraywref = $database->query_return($getwref);
|
||||
echo '<option value="">Select village</option>';
|
||||
if(mysqli_num_rows(mysqli_query($GLOBALS['link'],$getwref)) != 0){
|
||||
|
||||
@@ -79,7 +79,7 @@ if($FLData['owner'] == $session->uid){
|
||||
<div class="boxes boxesColor gray"><div class="boxes-tl"></div><div class="boxes-tr"></div><div class="boxes-tc"></div><div class="boxes-ml"></div><div class="boxes-mr"></div><div class="boxes-mc"></div><div class="boxes-bl"></div><div class="boxes-br"></div><div class="boxes-bc"></div><div class="boxes-contents cf">
|
||||
|
||||
<?php
|
||||
$getlid = $database->getRaidList($_GET["eid"]);
|
||||
$getlid = $database->getRaidList($database->escape($_GET["eid"]));
|
||||
$lid2 = $getlid['lid'];
|
||||
?>
|
||||
<input type="hidden" name="action" value="editSlot">
|
||||
|
||||
Reference in New Issue
Block a user