From e689b72c1fab1e6213c60e33c818ce1684397eba Mon Sep 17 00:00:00 2001 From: Fredrick Brennan Date: Sat, 20 Sep 2014 15:18:38 +0000 Subject: [PATCH] Try to stop people from replacing existing empty dirs --- create.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/create.php b/create.php index 70629b28..5dbf4b21 100644 --- a/create.php +++ b/create.php @@ -4,7 +4,7 @@ include "inc/functions.php"; include "inc/ayah/ayah.php"; include "inc/mod/auth.php"; checkBan('*'); -$bannedWords = array('loli', '/^cake$/', '8ch', '/^cp$/', 'child'); +$bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child'); $ayah = new AYAH(); @@ -48,6 +48,8 @@ if (!(strlen($subtitle) < 200)) error('Invalid subtitle'); if (!preg_match('/^[a-zA-Z0-9._]{1,30}$/', $username)) error('Invalid username'); +if (is_dir($uri)) + error("Cannot create board with name of reserved directory!"); if (!$score) error('You failed the game'); foreach (listBoards() as $i => $board) {