From fa30765cb80e7f4ca85999ce324a11a8c9dc7401 Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Tue, 20 Dec 2011 18:21:42 -0800 Subject: [PATCH] username exceptions, starting on tag filtering --- signup.php | 7 +++++++ tags.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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) -- 2.34.1