[Fusionforge-commits] r7056 - trunk/gforge/common/include

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Tue Feb 24 11:22:51 CET 2009


Author: aljeux
Date: 2009-02-24 11:22:51 +0100 (Tue, 24 Feb 2009)
New Revision: 7056

Modified:
   trunk/gforge/common/include/Group.class.php
Log:
check group name length+better warning msg

Modified: trunk/gforge/common/include/Group.class.php
===================================================================
--- trunk/gforge/common/include/Group.class.php	2009-02-24 10:22:45 UTC (rev 7055)
+++ trunk/gforge/common/include/Group.class.php	2009-02-24 10:22:51 UTC (rev 7056)
@@ -277,8 +277,11 @@
 			$this->setError(_('Group::create: Group object already exists'));
 			return false;
 		} else if (strlen($full_name)<3) {
-			$this->setError(_('Invalid full name'));
+			$this->setError(_('Full name is too short'));
 			return false;
+		} else if (strlen(htmlspecialchars($full_name))>50) {
+			$this->setError(_('Full name is too long'));
+			return false;
 		} else if (!account_groupnamevalid($unix_name)) {
 			$this->setError(_('Invalid Unix name'));
 			return false;




More information about the Fusionforge-commits mailing list