From 7be2d7d6ec07e588a1eca05fa91b38471a8afd34 Mon Sep 17 00:00:00 2001 From: Shadowss Date: Fri, 1 Nov 2013 09:33:06 +0200 Subject: [PATCH] fix profile --- GameEngine/Profile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GameEngine/Profile.php b/GameEngine/Profile.php index 4189c0d7..6aa6174a 100644 --- a/GameEngine/Profile.php +++ b/GameEngine/Profile.php @@ -80,7 +80,9 @@ class Profile { $database->submitProfile($database->RemoveXSS($post['uid']),$database->RemoveXSS($post['mw']),$database->RemoveXSS($post['ort']),$database->RemoveXSS($birthday),$database->RemoveXSS($post['be2']),$database->RemoveXSS($post['be1'])); $varray = $database->getProfileVillages($post['uid']); for($i=0;$i<=count($varray)-1;$i++) { - $database->setVillageName($database->RemoveXSS($varray[$i]['wref']),$post['dname'.$i]); + $k = "".$post['dname'.$i].""; + $name = preg_replace("/[^a-zA-Z0-9_-\s]/", "", $k); + $database->setVillageName($database->RemoveXSS($varray[$i]['wref']),$name); } header("Location: spieler.php?uid=".$post['uid']); }