[geeklog-cvs] Auth_Enterprise/Server AEPasswordRules.php,NONE,1.1
tony at iowaoutdoors.org
tony at iowaoutdoors.org
Thu Jul 1 12:35:58 EDT 2004
Update of /var/cvs/Auth_Enterprise/Server
In directory www:/tmp/cvs-serv11868
Added Files:
AEPasswordRules.php
Log Message:
Initial release
--- NEW FILE: AEPasswordRules.php ---
<?php
/**
* Auth_Enterprise
*
* This source file is subject to version 2.02 of the PHP license, that is bundled with this package
* in the file LICENSE, and is available at through the world-wide-web at
* http://www.php.net/license/2_02.txt. If you did not receive a copy of the PHP license and are
* unable to obtain it through the world-wide-web, please send a note to license at php.net so we can
* mail you a copy immediately.
*
* @author Tony Bibbs <tony at geeklog.net>
* @copyright 2004
* @version $Id: AEPasswordRules.php,v 1.1 2004/07/01 16:35:55 tony Exp $
*
*/
// Default Password Rules. Add any custom password rules to the bottom of this file
$gConf['pw_rule']['length']['description'] = sprintf('require %s-%s characters (inclusive)',
$gConf['pw_min_length'], $gConf['pw_max_length']);
$gConf['pw_rule']['length']['enabled'] = true;
$gConf['pw_rule']['length']['regex'] = '/^.{' . $gConf['pw_min_length'] . ','
. $gConf['pw_max_length'] . '}$/';
$gConf['pw_rule']['chars']['description'] = 'limit characters to (A-Z,a-z,0-9,!,@,#,$,%,^,&,*,(,),-,_ only)';
$gConf['pw_rule']['chars']['enabled'] = true;
$gConf['pw_rule']['chars']['regex'] = '/^[A-Za-z0-9$!@#&^()_-]*$/';
// Upper case Rule
if ($gConf['pw_require_upper']) {
$gConf['pw_rule']['upper']['enabled'] = true;
} else {
$gConf['pw_rule']['upper']['enabled'] = false;
}
$gConf['pw_rule']['upper']['description'] = 'require at least one upper case character (A-Z)';
$gConf['pw_rule']['upper']['enabled'] = true;
$gConf['pw_rule']['upper']['regex'] = '/.*[A-Z].*/';
// Lower case Rule
if ($gConf['pw_require_lower']) {
$gConf['pw_rule']['lower']['enabled'] = true;
} else {
$gConf['pw_rule']['lower']['enabled'] = false;
}
$gConf['pw_rule']['lower']['description'] = 'require at least one lower case character (a-z)';
$gConf['pw_rule']['lower']['regex'] = '/.*[a-z].*/';
// Number Rule
if ($gConf['pw_require_number']) {
$gConf['pw_rule']['number']['enabled'] = true;
} else {
$gConf['pw_rule']['number']['enabled'] = false;
}
$gConf['pw_rule']['number']['description'] = 'require at least one number (0-9)';
$gConf['pw_rule']['number']['regex'] = '/.*[0-9].*/';
// Special Characters Rule
if ($gConf['pw_require_special_char']) {
$gConf['pw_rule']['special']['enabled'] = true;
} else {
$gConf['pw_rule']['special']['enabled'] = false;
}
$gConf['pw_rule']['special']['chars'] = '!@#$%^&*()-_';
$gConf['pw_rule']['special']['description'] = 'require at least one of the following special characters '
. $gConf['pw_rule']['special']['chars'];
$gConf['pw_rule']['special']['enabled'] = true;
$gConf['pw_rule']['special']['regex'] = '/.*[$' . $gConf['pw_rule']['special']['chars'] . '].*/';
$gConf['pw_rule']['special']['description'] = 'require at least one letter X';
$gConf['pw_rule']['special']['enabled'] = false;
$gConf['pw_rule']['special']['regex'] = '/.*[X].*/';
// Add any custom password rules here
?>
More information about the geeklog-cvs
mailing list