From: Gabriel Dunne Date: Wed, 21 Dec 2011 02:21:42 +0000 (-0800) Subject: username exceptions, starting on tag filtering X-Git-Tag: v0.1~16 X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=fa30765cb80e7f4ca85999ce324a11a8c9dc7401;p=clmpr.git username exceptions, starting on tag filtering --- diff --git a/signup.php b/signup.php index b9eb442..4702517 100644 --- a/signup.php +++ b/signup.php @@ -10,6 +10,13 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' ) { + if (!$params['user'] || in_array($params['user'], $username_exceptions)) { + throw new Exception("invalid username"); + } + // if (!$params['pass']) { + // throw new Exception("invalid password"); + // } + $dbh = get_db_connection(); $dbh->beginTransaction(); diff --git a/tags.php b/tags.php index ba97f97..ffb9d24 100644 --- a/tags.php +++ b/tags.php @@ -52,7 +52,7 @@ catch(PDOException $e)