summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-04-09 14:03:48 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-04-09 20:48:20 +0200
commitfd5d406cee52da3aa28475b2418c1787e3489da2 (patch)
tree14166511eb0f5e331cdb576bd2fd0c561abafb2c /application
parent0c444bfb9b1ae8b43a27973d8893693b5c40ac21 (diff)
user/register: restrict username to max 32 chars
The db field is 32 chars long. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/controllers/user.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php
index 06ecc50dd..94791a5c0 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -137,7 +137,7 @@ class User extends CI_Controller {
$password = $this->input->post("password");
$password_confirm = $this->input->post("password_confirm");
- if (!$username || !preg_match("/^[a-z0-9]+$/", $username)) {
+ if (!$username || strlen($username) > 32 || !preg_match("/^[a-z0-9]+$/", $username)) {
$error[]= "Invalid username (only a-z0-9 are allowed).";
}