[Openupload-svn-update] SF.net SVN: openupload:[38] trunk/lib/modules/default/auth.inc.php
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-10-18 12:49:07
|
Revision: 38
http://openupload.svn.sourceforge.net/openupload/?rev=38&view=rev
Author: tsdogs
Date: 2008-10-18 12:48:58 +0000 (Sat, 18 Oct 2008)
Log Message:
-----------
Add login name check and fix login name length
Modified Paths:
--------------
trunk/lib/modules/default/auth.inc.php
Modified: trunk/lib/modules/default/auth.inc.php
===================================================================
--- trunk/lib/modules/default/auth.inc.php 2008-10-18 11:49:03 UTC (rev 37)
+++ trunk/lib/modules/default/auth.inc.php 2008-10-18 12:48:58 UTC (rev 38)
@@ -106,7 +106,12 @@
}
if (strlen($_POST['registerlogin'])<5) {
app()->error(tr('Login name must be at least 5 characters long!'));
+ $failed = true;
}
+ if (ereg_replace('[a-zA-Z0-9_]*','',$_POST['registerlogin'])!='') {
+ app()->error(tr('Login name contains an invalid character. Valid vharacters are %1','[a-z] [0-9] [_]'));
+ $failed = true;
+ }
if ($_POST['registername']=='') {
app()->error(tr('Please insert Full Name'));
$failed = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|