From 5d8937ad73086d137d71bc8e00a446e39af05d1c Mon Sep 17 00:00:00 2001 From: Shadowss Date: Fri, 1 Nov 2013 07:56:21 +0200 Subject: [PATCH] Fixed Registration hack --- GameEngine/Account.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GameEngine/Account.php b/GameEngine/Account.php index 94f955fd..26d7476d 100644 --- a/GameEngine/Account.php +++ b/GameEngine/Account.php @@ -52,6 +52,9 @@ class Account { else if(!USRNM_SPECIAL && preg_match('/[^0-9A-Za-z]/',$_POST['name'])) { $form->addError("name",USRNM_CHAR); } + else if(USRNM_SPECIAL && preg_match("/[:,\\. \\n\\r\\t\\s\\<\\>]+/", $_POST['name'])) { + $form->addError("name",USRNM_CHAR); + } else if($database->checkExist($_POST['name'],0)) { $form->addError("name",USRNM_TAKEN); } @@ -237,4 +240,4 @@ class Account { }; $account = new Account; -?> \ No newline at end of file +?>