diff --git a/3ds/acc/register.php b/3ds/acc/register.php index bdeb479..b79b3e5 100644 --- a/3ds/acc/register.php +++ b/3ds/acc/register.php @@ -22,14 +22,14 @@ body, html { \[\]\(\).,\/\\&?$=!%^#* ])/', $_POST["username"]) && count($_POST["username"]) >= 3){ +if(!file_exists("data/" . $_POST["username"] . ".json") && !preg_match_all('/([<>\[\]\(\).,\/\\&?$=!%^#* ])/', $_POST["username"]) && strlen($_POST["username"]) >= 3){ $passHash = password_hash($_POST["password"], PASSWORD_ARGON2ID); $date = date('Y/m/d H:i:s'); $details = array("username" => $_POST["username"], "password" => $passHash, "email" => $_POST["email"], "timezone" => "UTC", "created"=>$date,"createdmt"=>microtime(),"profile"=>"I have not filled this in yet","profilecomments"=>array(),"apps"=>array(),"hasPublishedCB"=>false,"comicbooks"=>array(0),"ownedComics"=>array(),"points"=>30,"cmsg"=>0,"forumPosts"=>array(),"reputation"=>1500,"banned"=>0,"admin"=>0,"ownedApps"=>array(),"drawings"=>array(),"pms"=>array()); $detailsEncoded = json_encode($details, true); file_put_contents("data/" . $_POST["username"] . ".json", $detailsEncoded); echo "

SUCCESS: Account created successfully!

"; - } else if (!(count($_POST["username"]) >= 3)){ + } else if ((strlen($_POST["username"]) <= 3)){ echo "

ERROR: Username cannot be shorter than 3 characters!"; } else { echo "

ERROR: That account already exists or contains symbols! (<>[]().,/\\&?$=!%^#*)

"; diff --git a/3ds/chat/rclaim.php b/3ds/chat/rclaim.php new file mode 100644 index 0000000..1f237d8 --- /dev/null +++ b/3ds/chat/rclaim.php @@ -0,0 +1 @@ + \ No newline at end of file